如何在ubuntulocalhost上使用magento配置nginx
我需要在nginx服务器上的ubuntu上安装magento 1.8和1.9。 我创建了配置,但工作不正常 我需要为magento 1.8和magento 1.9创建一个全局配置文件如何在ubuntulocalhost上使用magento配置nginx,magento,ubuntu,nginx,localhost,Magento,Ubuntu,Nginx,Localhost,我需要在nginx服务器上的ubuntu上安装magento 1.8和1.9。 我创建了配置,但工作不正常 我需要为magento 1.8和magento 1.9创建一个全局配置文件 server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.php index.html index.ht
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location / {
try_files $uri $uri/ =404;
}
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
# With php5-fpm:
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}
您在评论中声明收到403禁止信息。有很多因素可能导致这种情况。通过检查默认保存在/var/log/nginx/*.log中的nginx错误日志,可以找到有关此错误的更多信息 我强烈建议查看错误日志以获取更多信息,因为这将加快解决问题的过程 一,。不正确的web根目录 这是一个显而易见的问题,但请确保您拥有正确的web根集 $ls/usr/share/nginx/html 二,。目录和文件权限 检查您的web用户是否允许Ubuntu/Debian上的www数据作为目录本身访问web目录中的文件。通过在终端上运行来检查权限: $ls-l/usr/share/nginx/html 确保文件设置了正确的权限,例如,未设置为根所有权 Magento提供了有关重置Magento安装的文件权限的说明。总之,在终端上运行以下操作: 找到-f型-exec chmod 644{}\; 找到-d型-exec chmod 755{}\; CHMOD550梨
chmod 550 mage for magento 1.5+您的浏览器或nginx日志中会出现哪些错误消息?@RustyFluff error是403禁止的nginx