我用 Nginx 设置了一个服务器,并将我的 Public_HTML 设置为 -
/home/user/public_html/website.com/public
Run Code Online (Sandbox Code Playgroud)
它总是重定向到 -
/usr/local/nginx/html/
Run Code Online (Sandbox Code Playgroud)
我怎样才能改变这个?
Nginx.conf -
user www-data www-data;
worker_processes 4;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay off;
keepalive_timeout 5;
gzip on;
gzip_comp_level 2;
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
include /usr/local/nginx/sites-enabled/*;
}
Run Code Online (Sandbox Code Playgroud)
/usr/local/nginx/sites-enabled/default -
server {
listen 80;
server_name localhost;
location / {
root html;
index index.php index.html index.htm;
}
# redirect server error pages to the static …Run Code Online (Sandbox Code Playgroud)