Home CentOS7 nginx default.conf 완벽 설정 백업

nginx default.conf 완벽 설정 백업

by maxblog
0 comment
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
server {
listen 80;
server_name 221.XXX.XXX.XXX;
root /maxwww;
access_log /var/log/nginx/host.access.log main;
location / {
root /maxwww;
index index.php index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_read_timeout 300;
}
}
server { listen 80; server_name 221.XXX.XXX.XXX; root /maxwww; access_log /var/log/nginx/host.access.log main; location / { root /maxwww; index index.php index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } location ~ \.php$ { fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_read_timeout 300; } }
server {

    listen       80;
    server_name  221.XXX.XXX.XXX;

	root        /maxwww;
	access_log  /var/log/nginx/host.access.log  main;


    location / {
        root   /maxwww;
        index  index.php index.html index.htm;
    }



	error_page   500 502 503 504  /50x.html;
	   location = /50x.html {
	   root   /usr/share/nginx/html;
    }


	location ~ \.php$ {

         fastcgi_pass   unix:/var/run/php-fpm/php-fpm.sock;
         fastcgi_index  index.php;
         fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
         include        fastcgi_params;
	   fastcgi_read_timeout 300;
     }



}

기본 default.conf의 기본 완벽설정 백업이다.. 아이피 주소를 입력하면 서버의 웹서비스 루트로
이동시킬때 유리하다.. 머리 아플것 같으면 이것 복사해서 붙이면 끝!~~ ^^;
당연 아이피 주소와 폴더는 맞게 바꿔줘야한다.. 😀

좋아할만한 추천 글

Leave a Comment

Soledad is the Best Newspaper and Magazine WordPress Theme with tons of options and demos ready to import. This theme is perfect for blogs and excellent for online stores, news, magazine or review sites.

Buy Soledad now!

Edtior's Picks

Latest Articles

ⓒ 2023.  FUNCOM all rights reserved.