Skip to content

Commit

Permalink
Nginx配置文件优化
Browse files Browse the repository at this point in the history
  • Loading branch information
xianyunleo committed Feb 27, 2023
1 parent 2ba5ed5 commit 0523c2c
Show file tree
Hide file tree
Showing 21 changed files with 41 additions and 221 deletions.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions extra/win32/core/software/server/nginx/conf/rewrite/dedecms.conf

This file was deleted.

12 changes: 0 additions & 12 deletions extra/win32/core/software/server/nginx/conf/rewrite/discuzx.conf

This file was deleted.

15 changes: 0 additions & 15 deletions extra/win32/core/software/server/nginx/conf/rewrite/discuzx3.conf

This file was deleted.

This file was deleted.

32 changes: 0 additions & 32 deletions extra/win32/core/software/server/nginx/conf/rewrite/ecshop.conf

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions extra/win32/core/software/server/nginx/conf/rewrite/mvc.conf

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions extra/win32/core/software/server/nginx/conf/rewrite/sablog.conf

This file was deleted.

11 changes: 0 additions & 11 deletions extra/win32/core/software/server/nginx/conf/rewrite/seacms.conf

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

87 changes: 41 additions & 46 deletions extra/win32/core/software/server/nginx/conf/vhosts/localhost.conf
Original file line number Diff line number Diff line change
@@ -1,64 +1,59 @@
server {
server
{
listen 80;
server_name localhost;
index index.html index.htm index.php;
""""""root E:/my/EasySrv/extra/win32/core/www/localhost;
root /Applications/EasySrv/www/localhost;

autoindex on;
autoindex on;

#301_START
#301_END
#PHP_START
include php/php-7.4.conf;
#PHP_END

#HTTP_TO_HTTPS_START
#HTTP_TO_HTTPS_END
#301_START
#301_END

#SSL_START
#SSL_END
#HTTP_TO_HTTPS_START
#HTTP_TO_HTTPS_END


#REWRITE_START 引用url重写规则
#SSL_START
#SSL_END

#REWRITE_START
include vhosts/rewrite/localhost.conf;
#REWRITE_END

#PHP_START
include php/php-7.4.conf;
#PHP_END

#PHPMYADMIN_START
location /phpmyadmin {
""""""root E:/my/EasySrv/extra/win32/core/www/localhost;
index index.php;
include php/php-7.4.conf;
include phpmyadmin-static.conf;
}
#PHPMYADMIN_END
#EXTRA_INFO_START
#{"allowSyncHosts":true}
#EXTRA_INFO_END

#DENY_FILES_START
#DENY_FILES_START
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
{
return 403;
}
#DENY_FILES_END

location ~ .+\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 1d;
error_log off;
access_log off;
}

location ~ .+\.(js|css)$
{
expires 1h;
error_log off;
access_log off;
}
#DENY_FILES_END

location = /favicon.ico {
log_not_found off;
access_log off;
}
location ~ .+\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 1d;
error_log off;
access_log off;
}

location ~ .+\.(js|css)$
{
expires 1h;
error_log off;
access_log off;
}

location = /favicon.ico {
log_not_found off;
access_log off;
}

access_log logs/localhost.access.log;
error_log logs/localhost.error.log;
}
access_log logs/localhost.access.log;
error_log logs/localhost.error.log;
}

0 comments on commit 0523c2c

Please sign in to comment.