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?

1
25 comments

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

0
Avatar
Permanently deleted user

 

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
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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.

1
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

0
Avatar
Permanently deleted user

i use the chrome icon to open the file

0
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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

I have the same issue. `Allow unsigned requests` does not help. 

@... have you found any workaround for the issue?

0

Curiously this worked before, and is no longer working.

I am running WebStorm 2020.1.1, running in OpenJDK by Jetbrains.

Setting allow unsigned requests, or outside connections, does not change any behavior.

Any help is really welcome.

EDIT: deleted the .idea folder, and its working again.

2

It was working for me until I upgraded to PHPSTORM 2020.2.1 and now I always getting 404 error.0 "Can accept external connections" does not resolve the problem. Deleting the .idea folder does not resolve the problem either.

I really liked how it was working before :)

Edit: Created a new project and tried it - and now it works - so it seems not working only in the older projects.

0

Tadas Davidsonas please attach screenshots that were asked in a beginning of this thread:

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

0

http://localhost:63342/coding_academy/coding_academy/section-8/html-form.php?_ijt=7sbd812qf5cpich060mq39ov81

I thought a workaround could be -> Creating this same project from existing files option in Files -> .  However since the release of 2020.2.1 I do not see this option (PHPStorm is blocking Print Screen button to so I'm not able to make the screen shot of my Files menu). Any advice?

0

Try opening http://localhost:63342/coding_academy/section-8/html-form.php instead. Would that work?

1

Dmitry, 

thank you so much for your help! :) It works with your link. Not sure why it's picking `coding_academy` twice in the link by default when I click Chrome button.

Best wishes,

Tadas

0

You probably have it added twice for your In place web server config at File | Settings | Build, Execution, Deployment | Deployment. Check "Web server URL" and "Web path" in Mappings tab.

0

Please sign in to leave a comment.