
방금 Ubuntu 12.04 서버와 nginx 1.2.7을 설치하고 default
사이트 활성화에서 제거하고 내 파일 sites-available
을 sites-enabled
. 그런 다음 nginx를 다시 시작했습니다.
문제:그러나 URL로 이동하면 사이트가 로드되지 않습니다. netstat -nlp | grep nginx
둘 netstat -nlp | grep 80
다 결과를 반환하지 않습니다! lsof -i :80
또한 아무것도 반환하지 않습니다. 다른 서버의 A는 dig
올바른 IP 주소를 반환하므로 DNS 문제가 아니어야 합니다. 지금은 서비스를 중단한 아파치에 연결할 수 있었습니다. nginx 로그에도 아무것도 표시되지 않습니다.
이 문제를 어떻게 해결해야 합니까?
/etc/nginx/site-available/mysite.com
server {
listen 80;
server_name www.mysite.com mysite.com *.mysite.com;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
root /var/www/mysite/public;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$args ;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_read_timeout 300;
}
}