Browse Source

Better nginx.conf & Custome Logs

old-stable
Mitesh Shah 11 years ago
parent
commit
3bdc72da6a
  1. 7
      usr/local/sbin/easyengine
  2. 2
      usr/share/easyengine/nginx/wp/basic.conf
  3. 2
      usr/share/easyengine/nginx/wp/w3tc.conf
  4. 2
      usr/share/easyengine/nginx/wp/wpfc.conf
  5. 2
      usr/share/easyengine/nginx/wp/wpsc.conf
  6. 2
      usr/share/easyengine/nginx/wpsubdir/basic.conf
  7. 2
      usr/share/easyengine/nginx/wpsubdir/w3tc.conf
  8. 2
      usr/share/easyengine/nginx/wpsubdir/wpfc.conf
  9. 2
      usr/share/easyengine/nginx/wpsubdir/wpsc.conf
  10. 2
      usr/share/easyengine/nginx/wpsubdomain/basic.conf
  11. 2
      usr/share/easyengine/nginx/wpsubdomain/w3tc.conf
  12. 2
      usr/share/easyengine/nginx/wpsubdomain/wpfc.conf
  13. 2
      usr/share/easyengine/nginx/wpsubdomain/wpsc.conf

7
usr/local/sbin/easyengine

@ -119,8 +119,11 @@ COMMONNGINX()
sed -i "s/worker_connections.*/worker_connections 1024;/" /etc/nginx/nginx.conf
sed -i "s/worker_processes.*/worker_processes `cat /proc/cpuinfo | grep processor | wc -l`;/" /etc/nginx/nginx.conf
# Set Custome Headers And Logs And Variables like fastcgi_read_timeout client_max_body_size
sed -i "s/http {/http {\n\t### Easy Engine Settings\n\tadd_header X-Powered-By "EasyEngine";\n\tadd_header rt-Fastcgi-Cache \$upstream_cache_status;\n\n\tfastcgi_read_timeout 300;\n\tclient_max_body_size 100m;\n\n\tlog_format ee_cache '\$remote_addr - \$upstream_cache_status [\$time_local]'\n\t\t'\"\$request\" \$status \$body_bytes_sent'\n\t\t'\"\$http_referer\" \"\$http_user_agent\"';/" /etc/nginx/nginx.conf
# Set Custome Headers And Variables
sed -i "s/http {/http {\n\t##\n\t# Easy Engine Settings\n\t##\n\n\tadd_header X-Powered-By "EasyEngine";\n\tadd_header rt-Fastcgi-Cache \$upstream_cache_status;\n\n\tfastcgi_read_timeout 300;\n\tclient_max_body_size 100m;/" /etc/nginx/nginx.conf
# Set Custome Logs
sed -i "s/error_log.*/error_log \/var\/log\/nginx\/error.log;\n\n\tlog_format rt_cache '\$remote_addr - \$upstream_cache_status [\$time_local]'\n\t\t'\"\$request\" \$status \$body_bytes_sent'\n\t\t'\"\$http_referer\" \"\$http_user_agent\"';/" /etc/nginx/nginx.conf
# Check Directory Exist
if [ ! -d /etc/nginx/conf.d ]

2
usr/share/easyengine/nginx/wp/basic.conf

@ -3,7 +3,7 @@ server {
server_name example.com www.example.com;
access_log /var/log/nginx/example.com.access.log ee_cache;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;

2
usr/share/easyengine/nginx/wp/w3tc.conf

@ -3,7 +3,7 @@ server {
server_name example.com www.example.com;
access_log /var/log/nginx/example.com.access.log ee_cache;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;

2
usr/share/easyengine/nginx/wp/wpfc.conf

@ -3,7 +3,7 @@ server {
server_name example.com www.example.com;
access_log /var/log/nginx/example.com.access.log ee_cache;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;

2
usr/share/easyengine/nginx/wp/wpsc.conf

@ -3,7 +3,7 @@ server {
server_name example.com www.example.com;
access_log /var/log/nginx/example.com.access.log ee_cache;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;

2
usr/share/easyengine/nginx/wpsubdir/basic.conf

@ -9,7 +9,7 @@ server {
# Uncomment The Following Line For Domain Mapping
#server_name_in_redirect off;
access_log /var/log/nginx/example.com.access.log ee_cache;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;

2
usr/share/easyengine/nginx/wpsubdir/w3tc.conf

@ -9,7 +9,7 @@ server {
# Uncomment The Following Line For Domain Mapping
#server_name_in_redirect off;
access_log /var/log/nginx/example.com.access.log ee_cache;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;

2
usr/share/easyengine/nginx/wpsubdir/wpfc.conf

@ -9,7 +9,7 @@ server {
# Uncomment The Following Line For Domain Mapping
#server_name_in_redirect off;
access_log /var/log/nginx/example.com.access.log ee_cache;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;

2
usr/share/easyengine/nginx/wpsubdir/wpsc.conf

@ -9,7 +9,7 @@ server {
# Uncomment The Following Line For Domain Mapping
#server_name_in_redirect off;
access_log /var/log/nginx/example.com.access.log ee_cache;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;

2
usr/share/easyengine/nginx/wpsubdomain/basic.conf

@ -9,7 +9,7 @@ server {
# Uncomment The Following Line For Domain Mapping
#server_name_in_redirect off;
access_log /var/log/nginx/example.com.access.log ee_cache;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;

2
usr/share/easyengine/nginx/wpsubdomain/w3tc.conf

@ -9,7 +9,7 @@ server {
# Uncomment The Following Line For Domain Mapping
#server_name_in_redirect off;
access_log /var/log/nginx/example.com.access.log ee_cache;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;

2
usr/share/easyengine/nginx/wpsubdomain/wpfc.conf

@ -9,7 +9,7 @@ server {
# Uncomment The Following Line For Domain Mapping
#server_name_in_redirect off;
access_log /var/log/nginx/example.com.access.log ee_cache;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;

2
usr/share/easyengine/nginx/wpsubdomain/wpsc.conf

@ -9,7 +9,7 @@ server {
# Uncomment The Following Line For Domain Mapping
#server_name_in_redirect off;
access_log /var/log/nginx/example.com.access.log ee_cache;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;

Loading…
Cancel
Save