Running index.html gives a webpage that says 404 not found

I have recently installed PhpStorm and I tried running the html boilerplate template.  The resulting webpage displays 404 Not Found.  I also copied other HTML/Javascript projects to PhpStorm ide with the same result.  What am I doing wrong?

17 comments

Please show the resulting URL you see a browser, and also a screenshot of the PhpStorm window.

0

 

The url is:  http://localhost:63342/SPLATCHER/public_html/index.html

0

Do I get right that index.html is in fact in SPLATCHER and not in public_html?
If I do, that's the reason - the path is incorrect. Please show me a screenshot of the run/debug configuration you use (or do you open the page with a browser icon?).

0

Here is a screenshot of the Run/Debug configuration:

 

I moved index.html to the public_html folder and I still have the same problem.

 

The HTML5 Boilerplate project (PhpStorm Template) also gives the same result.

Here is the screenshot:

0

I was wondering if the problem is that my PhpStorm installation is not configured with Apache/Tomcat.  If not, how would one go about doing that?

0

I solved my problem!  There is a check box in Settings that allows "unsigned requests".  I checked that check box and all my projects work!  Thank you for your time.

0

I have the same problem with idea 2018 and i don't know how to solve it, If somebody can help

0

Did you try to follow the steps advised above? 

If that doesn't help - please attach screenshots that Eugene asked OP initially.

0

I don't know what is that mean "Eugene asked OP initially"?, if you mean what i get when open an html file on idea, i get white page wit 404 not found message, i tried pycharm and it works fine
I am on linux by the way, and of course i tried the above solution and not working

0

I think that Dmitry meant the very first Eugene's post:

"Please show the resulting  URL you see a browser, and also a screenshot of the PhpStorm window."

 

Could you also please tell how exactly do you open an HTML file?

Are you trying to open it with browser icon in IDE editor area or you have Run/Debug configuration set up?

0

i use the chrome icon to open the file

0

The same here.

IntelliJ IDEA 2018.3.3 (Ultimate Edition)
Build #IU-183.5153.38, built on January 9, 2019
JRE: 10.0.2+13 amd64
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation
Linux 4.15.0-43-generic

I just started a new static web project and put an index.html into the root directory. Clicking a browser button always shows 404 page.

URL is: http://localhost:63342/here/index.html?_ijt=j67betu5beps2bfdsot3dlg5ic

'here' is the project and folder name.

Checking 'Allow unsigned requests' does not help.

Regards Oliver

0

Same problem started yesterday (I think). Checking "Can accept external connections" resolved issue for me in PyCharm.

0

Eng, Oliver, please check if your settings are similar to what Vidmantas showed on his screenshot.

Oliver, also, did you copy the info from the Help | About window? Is there a reason you're running PhpStorm with the Oracle JDK and not the built-in one?

0

FYI - once website loaded on localhost, checking/unchecking "Can accept external connections" and "Allow unsigned requests" has no effect anymore. In addition, it might be worth to mention, that I am running server on local network (0.0.0.0) ant website worked at the point where localhost did not.

0

Hello Eugene,

no, changing the settings does not have any effect but switching to the version with the build-in JRE solves it.

Mark, this is about IntelliJ IDEA Ultimate (2018.3.3), not PHPStorm.

Would be interesting to know why this happens. Is there some debug logging available? When I run the version with the external JDK (Oracle), there are some warnings on the commandline:

Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.intellij.ide.ClassUtilCore to field sun.net.www.protocol.jar.JarFileFactory.fileCache
WARNING: Please consider reporting this to the maintainers of com.intellij.ide.ClassUtilCore
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

As for the reason: The oracle JDK worked for years without problems  and I don't like the idea of each JAVA application bringing its own JRE/JDK with hundreds of megabyte when there is already an up-to-date JRE/JDK on the destination system.  

Regards Oliver

0

Please sign in to leave a comment.