Nginx服务器仅显示默认页面
我对Nginx服务器有一个问题,因为它只显示默认页面。虚拟主机和主机文件似乎正常。我不明白问题出在哪里 以下是我的虚拟主机配置:Nginx服务器仅显示默认页面,nginx,Nginx,我对Nginx服务器有一个问题,因为它只显示默认页面。虚拟主机和主机文件似乎正常。我不明白问题出在哪里 以下是我的虚拟主机配置: server { listen 80; listen [::]:80; listen 443 default ssl; server_name marketplace_unirgy; ssl_certificate /etc/nginx/ssl/nginx.crt; ssl_certificate_key /et
server {
listen 80;
listen [::]:80;
listen 443 default ssl;
server_name marketplace_unirgy;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
root /var/www/html/marketplace_unirgy/;
index index.php;
#location / {
# index index.html index.php;
# autoindex on;
# #If missing pass the URI to Magento's front handler
# try_files $uri $uri/ @handler;
# expires max;
#}
#need it to execute php
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
include fastcgi_params;
include fastcgi.conf;
}
## Magento uses a common front handler
location @handler {
rewrite / /index.php;
}
}
我的主人:
127.0.0.1 marketplace_unirgy localhost
我的网站位于
/var/www/html/marketplace\u unirgy
出于某种原因,您似乎已将默认位置注释掉。尝试通过以下方式启用它:
location / {
try_files $uri $uri/ /index.php;
}
有关详细信息,请参阅和。感谢您的帮助。我的magento数据库中的“核心配置数据”字段“patht inside”存在问题。如果未正确设置此值,请将URL重定向到此字段中的值。它对我是隐藏的。