我的服务器上安装了Nginx和乘客。试图从它上运行葡萄(Rack) API。
当我部署Rails应用程序时,我在Nginx中有这个服务器块;
server {
listen 80;
server_name yourserver.com;
# Tell Nginx and Passenger where your app's 'public' directory is
root /path-to-app/public;
# Turn on Passenger
passenger_enabled on;
passe
你好,我刚刚完成了我的服务器和我所有的代码文件的设置,但是我有一个问题。每当我进入时,它都会给出一个错误,说明找不到/public/index文件。
设置我的站点的方式是,所有的请求都进入公用文件夹,该文件夹保存了我的index.php文件,用于路由我的所有页面。不是在我的本地服务器上,一切都运行得完美无缺,但是在我的数字海洋服务器上,每当我转到索引页面时,它就不工作了。但是如果我去,页面就会加载得很完美。这就是我的.htaccess文件在我的公用文件夹中的样子,它会路由我所有的页面和请求:
<IfModule mod_rewrite.c>
RewriteEngine On
Re
我在NGINX服务器上运行了以下文件夹结构。
-- Laravel installation
-- Magento installation [DOCUMENT ROOT]
-- Laravel's public folder renamed to a different name
-- WordPress installation
该网站的结构如下:
www.example.com = Magento
www.example.com/subsite = Laravel [This is its 'public' folder.
Rest
我试图使用Silex和Nginx构建一个网页,但是服务器定义中可能有错误,因为当我试图访问它时,会出现以下错误:
No input file specified.
我的服务器定义如下:
server {
listen [::]:80;
server_name comparer.com;
root /var/www/comparer.com/web/public;
index index.php;
#site root is redirected to the app boot script
location = / {
try_
我的问题是在Nginx服务器(Ubuntu)上使用Laravel5.4提供CSS和JS文件。我已经将服务器配置为从嵌套子目录(而不是在web服务器的根目录中)为应用程序提供服务。路由是有效的。请参见:
还有.博客/还有。
问题是我不能包含JS文件(可能还有css)。JS文件位于"blog/public/js/posts.js“中。
下面是我的站点配置,以及在刀片模板中包含一个JS文件的代码。当您访问站点时,您可以在控制台中查看错误。
服务器配置:
server {
return 404;
}
server {
listen 80;
li