Home CentOS7 nginx maxnas.conf 완벽 설정

nginx maxnas.conf 완벽 설정

by maxblog
0 comment
server {
	listen       80;
	server_name maxnas.net www.maxnas.net;
	return 301 https://$host$request_uri;
}




server {

	listen       443 ssl;
	server_name maxnas.net www.maxnas.net;

	ssl_certificate /etc/letsencrypt/live/maxnas.net/fullchain.pem;
	ssl_certificate_key /etc/letsencrypt/live/maxnas.net/privkey.pem; 



	root   /maxwww/maxnas.net/public;
	index index.php index.html index.htm;
   
	try_files $uri $uri/ /index.php?q=$uri&$args; 
    
    

    location ~ \.php$ {

	try_files $uri =404;
	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;
	}
    

	location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
	expires 1M;
	access_log off;
	add_header Cache-Control "public";
	}

	location ~* \.(?:css|js)$ {
	expires 1y;
	access_log off;
	add_header Cache-Control "public";
	}



}

maxnas.conf 설정 완벽 백업이다.. 워드프레스용이랑은 다른 php script 용이며
이것을 복사해서 다른 php script 설정에 사용하면 된다…😀

좋아할만한 추천 글

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.