ubuntu nginx php7.0 fpm
ubuntu nginx php7.0 fpm 설정으로 서버를 갈아탔는데. 일부 페이지가 깨지던가 아니면 404 not found 를 뿜어대는군요.. 그리고 몇몇 이미지도 이미지 폴더에 정상적으로 위치하고 있는데..엑박 나오고요...
혹시 어떤 이유에서 그런지 아시는분 답변좀 해주시면 감사할께요...
niginx.conf 설정입니다.
Copy
server { listen 80; server_name xxx.com www.xxx.com; root /home/ubuntu/new_www; charset utf-8; access_log /var/log/nginx/adon.access.log main; error_log /var/log/nginx/adon.error.log; location / { index index.php index.html index.htm; } location /data/ { location ~.*\.(php|html|htm|pl|cgi|inc|lib)?$ { deny all; } } location /data/file/ { location ~.* { # access_log off; # log_not_found off; expires 360d; } } location /data/cache/ { allow 127.0.0.1; deny all; location ~.*\.(php|html|htm|pl|cgi|inc|lib)?$ { deny all; } } error_page 403 404 /40x.html; location = /40x.html { root html; allow all; } # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; allow all; } location ~*\.(jpg|jpeg|gif|png|css|js|ico|xml|swf)$ { access_log off; log_not_found off; expires 360d; # valid_referers none blocked mohae.kr *.mohae.kr; # if ($invalid_referer) { return 404; } } location ~ .php$ { fastcgi_buffer_size 128k; fastcgi_buffers 256 16k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; fastcgi_read_timeout 240; fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_index index.php; try_files $uri =404; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_intercept_errors on; } location ~ /\.ht { deny all; }location = /favicon.ico { log_not_found off; access_log off;}location = /robots.txt { allow all; log_not_found off; access_log off;}# Deny all attempts to access any dotfile (=hidden files) such as .htaccess, .htpasswd, .DS_Store, .directory, .svn, .git, ...location ~ /\. { deny all; access_log off; log_not_found off;}}
|
답변 2개 / 댓글 2개
2017-08-25 (금) 14:10:14
@미드나잇쿨
아. .질문올리시려고 변경하신거였군요
404는 파일을 못찾는거라서
홈 디렉토리 설정을 살펴보시는게 어떨까요
답변에 대한 댓글 1개
미드나잇쿨
2017-08-25 (금) 14:20:11
2017-08-25 (금) 14:05:57
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.
현재 설정은 이렇게 되어있습니다.