Unable to open index html

[html] when I try to open an HTML file through `http://localhost/xampp/htdocs/index.html` it says unable to connect to localhost

I have installed XAMPP , there is a htdocs folder and inside it index.html file , when I try to open it in my browser through http://localhost/xampp/htdocs/index.html it says unable to connect to localhost .

This question is related to html xampp

The answer is

 http://localhost/xampp/htdocs/index.html 

or if index.html is saved in a folder in htdocs then

htdocs is your default document-root directory, so you have to use localhost/index.html to see that html file. In other words, localhost is mapped to xampp/htdocs , so index.html is at localhost itself. You can change the location of document root by modifying httpd.conf and restarting the server.

Start your XAMPP server by using:

Then you have to use the URI http://localhost/index.html because htdocs is the document root of the Apache server.

If you’re getting redirected to http://localhost/xampp/* , then index.php located in the htdocs folder is the problem because index.php files have a higher priority than index.html files. You could temporarily rename index.php.

You need to start your Apache Server normally you should have an xampp icon in the info-section from the taskbar, with this tool you can start the apache server as wel as the mysql database (if you need it)

Читайте также:  Java jdk 8 deb

All created by user files saved in C:\xampp\htdocs directory by default, so no need to type the default path in a browser window, just type http://localhost/yourfilename.php or http://localhost/yourfoldername/yourfilename.php this will show you the content of your new page.

I just put an index.html file in /htdocs and type in http://127.0.0.1/index.html — and up comes the html.

Add a folder «named Forum» and type in 127.0.0.1/forum/.

You should simply create your own folder in htdocs and save your .html and .php files in it. An example is create a folder called myNewFolder directly in htdocs. Don’t put it in index.html. Then save all your.html and .php files in it like this-> «localhost/myNewFolder/myFilename.html» or «localhost/myNewFolder/myFilename.php» I hope this helps.

Источник

How to open index.html file in chrome on a PC?

Hello! I’m currently in Stage 2 of Web Design, Text Editors and HTML and I am following along with the video. I have downloaded Sublime Text, opened it, saved the file as index.html as instructed in the video. But I’m lost as at 01:52 in the video when he says «We’ll go ahead and open up our index.html file. I’m going to open our finder window here, and I’ll simply drag this onto Google Chrome to go ahead and open it.» I am using a PC and am unable to figure out how to go about this. I’m not very tech savvy, i know it must be something ridiculously simple to do because even a Google search yielded no useful info on this dilemma. So I beg of you, please HELP ME! I have tried dragging from my desktop and taskbar to no avail. Feel free to break it down to me as if I’m a 5 year old, I won’t mind, I’ll APPRECIATE IT! Thank you in advance!

6 Answers

Jeremy Stenseth

Jeremy Stenseth
Jeremy Stenseth

Make sure you have chrome installed. Right click on the index.html file you want to open, choose open with (which will give you a list of programs), choose chrome. There are ways to set defaults when opening files but that depends on personal preference.

James Barnett
James Barnett

It’s important to note that Chrome isn’t required here. You can use Safari, Firefox or Internet Explorer 11 (on Windows 7 & 8) as well.

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable To Open ‘client/index.html’ #47

Unable To Open ‘client/index.html’ #47

Comments

I’ve changed every permission possible, ran cmd as admin, moved to files to another drive, even redownloaded the whole this (i know, i know. ) but i can’t get it to work. this is the output:

———————————————
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Windows\system32>»E:\Random\Streaming Stuff\ThatAwesomeDesktopStreamer\jsmpeg-vnc.exe» -p 9006 -s 1366×768 PCSX
Window 0x009c0c78: «PCSX2 1.4.0 — Midnight Club 3: DUB Edition»
Window size: 1440×900, output size: 1366×768, bit rate: 2049 kb/s

[swscaler @ 02421fe0] Warning: data is not aligned! This can lead to a speedloss
[229939:4741] ERR: Unable to open ‘client/index.html’)
fps: 35 (grabbing: 6.06ms, scaling/encoding: 16.29ms)
———————————————

Windows 10 Pro 64-bit running on AMD A10-7850K@3.7GHz

The text was updated successfully, but these errors were encountered:

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to serve index.html at the route «/» #41

Unable to serve index.html at the route «/» #41

Comments

The following doesn’t work, returning a file not found error.

@app.route("/") def root(request): return File("index.html")
@app.route("/index.html") def root(request): return File("index.html")
@app.route("/") def root(request): return "Hello"

This is a failing test that I think illustrates the problem

def test_staticRoot_noBranch(self): """ The following should return the contents of the file index.html @app.route("/") def root(request): return File("index.html") """ app = self.app request = requestMock("/") @app.route("/") def root(request): return File(__file__) d = _render(self.kr, request) def _cb(result): self.assertEqual(request.getWrittenData(), open(__file__).read()) self.assertEqual(request.finishCount, 1) d.addCallback(_cb) return d

The text was updated successfully, but these errors were encountered:

This is not a problem unique to klein.

Consider the following invocation of twistd’s web plugin:

$ echo "Hello, world!" > hello.txt $ twistd -n web --path hello.txt 2014-03-14 13:00:24-0700 [-] Log opened. 2014-03-14 13:00:24-0700 [-] twistd 12.2.0 (/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python 2.7.5) starting up. 2014-03-14 13:00:24-0700 [-] reactor class: twisted.internet.selectreactor.SelectReactor. 2014-03-14 13:00:24-0700 [-] Site starting on 8080 2014-03-14 13:00:24-0700 [-] Starting factory 2014-03-14 13:00:26-0700 [HTTPChannel,0,127.0.0.1] 127.0.0.1 - - [14/Mar/2014:20:00:26 +0000] "GET / HTTP/1.1" 404 145 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.149 Safari/537.36" 

You’ll notice that GET / always fails with a 404 .

Is this addressed by using the same technique as in #59? I.E., something like this:

UPDATE: The technique from #59 seems to work for me:

from klein import Klein from twisted.web.static import File app = Klein() @app.route('/', branch=True) def root(request): f = File(__file__) f.isLeaf = True f.type, f.encoding = 'text/plain', None # force MIME type for browser rendering return f if __name__ == '__main__': app.run('localhost', 8080)

Источник

No input file specified — [proxy_fcgi:error] Got error ‘Unable to open primary script: [PATH]/html/index.php (No such file or directory)\n’

I have a peculiar situation that is only happening on the root domain and NOT subdomains. For example, CraftCMS (2.6.3019) running on Apache with php-fpm works fine on dev.some-domain.tld and test.some-domain.tld , but for www.some-domain.tld it fails with: In browser:

[Fri Aug 03 13:59:12.42352 2018] [proxy_fcgi:error] [pid 31552:tid 132443556343644] [client xxx.xxx.xxx.xxx:55292] AH01071: Got error ‘Unable to open primary script: /home/USERNAME/public_html/production/current/html/index.php (No such file or directory)\n’

For identical installations for other subdomains, everything loads up and works great. There is no difference in .htaccess or otherwise. The only differential that we can figure must be something with how Apache’s handling the root document location or permissions for the root domain. but we’re not seeing anything. For good measure, here’s the .htaccess contents (that are identical on the working subdomains and this failing root domain):

 ExpiresActive On ExpiresDefault "access plus 1 year" php_flag zlib.output_compression on AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary Header append Vary User-Agent env=!dont-vary RewriteEngine On RewriteCond % !-f RewriteCond % !-d RewriteCond % !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC] RewriteRule (.+) index.php?p=$1 [QSA,L] RewriteCond % !^www\. [NC] RewriteRule ^(.*)$ https://www.%/$1 [R=301,L] RewriteCond % !=on RewriteRule ^.*$ https://%% [R,L] 

I thought that perhaps it was the cgi.fix_pathinfo=1 setting for the php.ini , but that also didn’t resolve this. cPanel support is saying it is absolutely a code issue, but we’re pretty much convinced it’s an Apache / cPanel issue. It would be nice to have some input on this since this particular incident of No input file specified does not seem to match the others already found here and elsewhere on the web.

Источник

Оцените статью