我已经在vps上配置了LEMP堆栈,并将“A”记录设置为服务器的IP地址(v4)。迈多明。com和公文包一样工作得很好。密多米安。com中,我只使用CSS和JS,并用*索引。html索引。但在我的博客部分,我已经使用了博客。密多米安。com和我将其配置得非常好。NGNIX方面没有错误,但我尝试用博客打开wordpress。mydomain。com返回404错误。这里有没有人有过同样的经历,谁能帮我解决?我将分享我的域名。conf-inside/etc/nginx/sites-available/mydomian。com此处。提前感谢
server {
listen 80;
root /var/www/mydmoain.com/public_html;
index index.html index.htm index.nginx-debian.html;
access_log /var/www/mydmoain.com/access.log;
server_name mydmoain.com www.mydmoain.com;
location / {
# try_files $uri $uri/ =404;
}
}
server {
listen 80;
location / {
root /var/www/portfolio.mydmoain.com/public_html;
index index.html index.htm;
}
server_name portfolio.mydmoain.com;
access_log /var/www/portfolio.mydmoain.com/access.log;
error_log /var/www/portfolio.mydmoain.com/error.log;
}
server {
listen 80;
location / {
root /var/www/blog.mydmoain.com/public_html;
index index.php index.html index.htm index.nginx-debian.html;
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \\.php$ {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
include snippets/fastcgi-php.conf;
}
location ~ /\\.ht {
deny all;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~* \\.(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
log_not_found off;
}
server_name blog.mydmoain.com;
access_log /var/www/blog.mydmoain.com/access.log;
error_log /var/www/blog.mydmoain.com/error.log;
}