在LEMP服务器的子目录内的Ghost博客的Nginxconfiguration问题
我的要求 鬼博客www.mydomain.com/blog 根目录中的index.html,contact.php,几个图像和js文件。 (即像www.mydomain.com/index.html,mydomain.com/contact.php等) 阅读本教程之后,我可以运行幽灵在www.mydomain.com/blog上。 但不幸的是,我无法访问根目录,即www.mydomain.com任何东西,因为它会引发404错误 在安装Ghost之前在/usr/share/nginx/www目录下的所有内容都可用。 现在,我用ls命令检查文件是否存在于文件夹/usr/share/nginx/www ,我可以在terminal上查看这些文件。 当我cd到/etc/nginx/sites-available/文件夹时,我可以看到2个文件ghost和default以及/etc/nginx/sites-enabled/我只能看到ghost文件。 当我将/etc/nginx/sites-available/的默认文件复制到/etc/nginx/sites-enabled/ ,Ghost Blog给出了一个404错误。 这里是默认文件内容服务器{listen 80 default_server; 听[::]: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 / { # First attempt to serve request as file, then # as directory, then fall back to displaying […]