Set the root path without project name

How do I fix the path that chrome sees on my projects? For example the url in the browser looks like:


I want it to look like: 


I've tried changing the Content Resource Root but it doesn't make a difference. It's set to /home/"username"/myproject,

If I can correct this my links to stylesheets and images will work correctly and I'll actually be able to use WebStorm. 

I'm using a Ubuntu 16.04 64 bit workstation, and Webstorm 2017.3.2


The built-in web server serves files from http://localhost:63342/<project name> (this is done to allow serving several projects at once).
There is no way to set it up to use http://localhost:63342/ URL. But you can configure it to use URLs like http://<project_name>:<port> where the 'project name' is a name specified in hosts file, like project_name. See

But, rather than changing hosts, etc., I'd suggest using different server (Apache, etc.) to host your application if you like it being served from the root.


Thanks Elena,

Out of curiosity, why do you recommend using a different server over changing the hosts file?




The built-in webserver is a simple solution for development - it has some limitations as compared to full-functional web server, and you will still need a different server for production. Also, we have some reports regarding performance degradation when debugging applications with modified hosts.


Please sign in to leave a comment.