我正在尝试使用 shell 脚本安装 nginx,但似乎我犯了一个错误:
# INSTALL NGINX
apt-get install nginx
# LINK CONFIGURATION FILE
ln -fs /etc/configuration/nginx/nginx/app.conf /etc/nginx/sites-available/app
ln -fs /etc/configuration/nginx/nginx/nginx.conf /etc/nginx/nginx.conf
# RESTART
service nginx restart
我的 app.conf 配置如下:
server {
listen 80;
root /home/deploy/project123;
server_name www.project123.com;
location / { try_files $uri @app; }
location @app {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.sock;
}
}
我的 nginx.conf 是这样的:
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
access_log /var/log/nginx/access.log;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
我的代码在:/home/deploy/project123
当我访问该站点时,我得到一个 404,好像没有运行一样。谁能告诉我我做错了什么?