ubuntu nginx php7.0 fpm
ubuntu nginx php7.0 fpm 설정으로 서버를 갈아탔는데. 일부 페이지가 깨지던가 아니면 404 not found 를 뿜어대는군요.. 그리고 몇몇 이미지도 이미지 폴더에 정상적으로 위치하고 있는데..엑박 나오고요...
혹시 어떤 이유에서 그런지 아시는분 답변좀 해주시면 감사할께요...
niginx.conf 설정입니다.
</span></p><p>server {</p><p> listen 80;</p><p> server_name xxx.com <a href="<a href="http://www.xxx.com;" target="_blank" rel="noopener noreferrer">http://www.xxx.com;</a>">www.xxx.com;</a></p><p style="margin-left: 40px;">
</p><p> root /home/ubuntu/new_www;</p><p>
</p><p>
</p><p> charset utf-8;</p><p>
</p><p> access_log /var/log/nginx/adon.access.log main;</p><p> error_log /var/log/nginx/adon.error.log;</p><p>
</p><p> </p><p>
</p><p> location / {</p><p> index index.php index.html index.htm;</p><p>
</p><p><span style="font-size: 11pt;"> }</span> </p><p><span style="font-size: 11pt;"> </span> </p><p>
</p><p> location /data/ {</p><p> location ~.*\.(php|html|htm|pl|cgi|inc|lib)?$ {</p><p> deny all;</p><p> }</p><p> }</p><p>
</p><p> location /data/file/ {</p><p> location ~.* {</p><p> # access_log off;</p><p> # log_not_found off;</p><p> expires 360d;</p><p>
</p><p> }</p><p> }</p><p>
</p><p> location /data/cache/ {</p><p> allow 127.0.0.1;</p><p> deny all;</p><p>
</p><p> location ~.*\.(php|html|htm|pl|cgi|inc|lib)?$ {</p><p> deny all;</p><p> }</p><p> }</p><p>
</p><p>
</p><p> error_page 403 404 /40x.html;</p><p> location = /40x.html {</p><p> root html;</p><p> allow all;</p><p> }</p><p>
</p><p> # redirect server error pages to the static page /50x.html</p><p> #</p><p> error_page 500 502 503 504 /50x.html;</p><p> location = /50x.html {</p><p> root html;</p><p> allow all;</p><p> }</p><p>
</p><p> location ~*\.(jpg|jpeg|gif|png|css|js|ico|xml|swf)$ {</p><p> access_log off;</p><p> log_not_found off;</p><p> expires 360d;</p><p>
</p><p> # valid_referers none blocked mohae.kr *.mohae.kr;</p><p> # if ($invalid_referer) { return 404; }</p><p>
</p><p>
</p><p> }</p><p>
</p><p>
</p><p>
</p><p> location ~ .php$ {</p><p>
</p><p> fastcgi_buffer_size 128k;</p><p> fastcgi_buffers 256 16k;</p><p> fastcgi_busy_buffers_size 256k;</p><p> fastcgi_temp_file_write_size 256k;</p><p> fastcgi_read_timeout 240;</p><p>
</p><p> fastcgi_pass unix:/run/php/php7.0-fpm.sock;</p><p> </p><p> fastcgi_index index.php;</p><p> try_files $uri =404;</p><p> include fastcgi_params;</p><p> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;</p><p> fastcgi_param SCRIPT_NAME $fastcgi_script_name;</p><p>
</p><p> fastcgi_intercept_errors on;</p><p>
</p><p> }</p><p>
</p><p>
</p><p> location ~ /\.ht {</p><p> deny all;</p><p> }</p><p>
</p><p>
</p><p>location = /favicon.ico {</p><p> log_not_found off;</p><p> access_log off;</p><p>}</p><p>location = /robots.txt {</p><p> allow all;</p><p> log_not_found off;</p><p> access_log off;</p><p>}</p><p>
</p><p># Deny all attempts to access any dotfile (=hidden files) such as .htaccess, .htpasswd, .DS_Store, .directory, .svn, .git, ...</p><p>location ~ /\. {</p><p> deny all;</p><p> access_log off;</p><p> log_not_found off;</p><p>}</p><p>
</p><p>}</p><div>
답변 2개
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
server_name 이 좀 이상해보이네요
https://blog.lael.be/post/2600">https://blog.lael.be/post/2600
이런글 함번 참고해보세요
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
현재 설정은 이렇게 되어있습니다.