Rubymine(Jetbrains)本地服务器.我可以让它从本地主机根目录运行吗? [英] Rubymine(Jetbrains) local server. Can I get it to run from localhost root?

查看:155
本文介绍了Rubymine(Jetbrains)本地服务器.我可以让它从本地主机根目录运行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,当我打开正在处理的html文件时,它会将我带到

Currently when I open the html file I'm working on it takes me to

http://localhost:63342/project-folder/index.html

是否有一种方法可以设置Rubymine从根目录运行我的项目,例如.

Is there a way to set Rubymine to run my project from the root, eg.

http://localhost:63342/index.html

推荐答案

http://localhost:63342/index.html-无法使用内置Web服务器的这种 URL em> ..因为IDE不知道要服务的项目(因为它适用于您的所有项目,不仅是当前打开的).

http://localhost:63342/index.html -- you cannot have this kind of URL with built-in web server .. as IDE does not know what project to serve (as it works for ALL your projects a not only currently opened).

使用内置Web服务器时,URL 必须具有一些提示(PROJECT_NAME),它们可以告诉服务的项目(在何处进行)文件).

When built-in web server is in use, the URL has to have some hint (PROJECT_NAME) that would tell what project to serve (where to take files from).

内置Web服务器支持2种URL(它们都将提供相同的文件):

Built-in web server supports 2 kind of URLs (both of them will serve the same file):

http://localhost:63342/PROJECT_NAME/index.html
http://PROJECT_NAME:63342/index.html

如果您想要第二个URL,则必须执行以下步骤:

If you want 2nd URL, then you will have to do these steps:

A:创建此项目的部署"条目(Settings | Deployment)并将其标记为默认" .在IDE中打开页面时,将使用此处定义的URL(http://PROJECT_NAME:63342/).

A: Create Deployment entry (Settings | Deployment) and mark it as Default for this project. The URL defined there (http://PROJECT_NAME:63342/) will be used when opening pages from within IDE.

B:在您的hosts文件(或本地DNS服务器,如果有)中,定义一个条目,该条目将PROJECT_NAME指向您的IP.例如(对于hosts文件):127.0.0.1 PROJECT_NAME

B: In your hosts file (or your local DNS server, if you have one) define an entry that would point PROJECT_NAME to your IP. For example (for hosts file): 127.0.0.1 PROJECT_NAME

这篇关于Rubymine(Jetbrains)本地服务器.我可以让它从本地主机根目录运行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆