Nginx plus PHP Fpm
Hi I am suing nginx and php fpm on my VPS with plugin from sysally.net.
I am having some issue, one i dont know where is cache storage of nginx in this plugin.
2ndly goolge ds are giving me problems. some time aids are showing and some times they are not showing. Is this due to cache or gooogle can not access my server???
i have no line regarding cache path in my nginx config.
here is site nginx.
here is default nginx
server {
listen 111.111.111.111:80; ## listen for ipv4;
root /home/user/public_html/dir;
include /opt/pifpm/nginx.include.d/domain.com.indexprio;
access_log /usr/local/apache/domlogs/domain.com;
# Server name and its aliases
server_name www.domain.com domain.com;
include /opt/pifpm/nginx.include.d/domain.com.autoinclude;
location / {include /opt/pifpm/nginx.include.d/domain.com.include;}
##Additional_locations
set $cache_uri $request_uri;
# POST requests and urls with a query string should always go to PHP
if ($request_method = POST) {
set $cache_uri 'null cache';
}
if ($query_string != "") {
set $cache_uri 'null cache';
}
# Don't cache uris containing the following segments
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
set $cache_uri 'null cache';
}
# Don't use the cache for logged in users or recent commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") {
set $cache_uri 'null cache';
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; }
location ~ .php$ {
try_files $uri /index.php;
include fastcgi_params;
fastcgi_pass unix:/opt/pifpm/fpmsockets/name.sock;
}
# Cache static files for as long as possible
location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
expires max; log_not_found off; access_log off;
}
location /mailman/ {
proxy_pass http://111.111.111.111:9999;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /cpanel {
proxy_pass http://111.111.111.111:2082;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /whm {
proxy_pass http://111.111.111.111:2086;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /webmail {
proxy_pass http://111.111.111.111:2095;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}
here is default nginx
user nobody;
worker_processes 8;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
client_max_body_size 32m;
client_body_buffer_size 128k;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
connection_pool_size 256;
client_header_buffer_size 4k;
large_client_header_buffers 4 32k;
request_pool_size 4k;
output_buffers 4 32k;
postpone_output 1460;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
# the below options depend on theoretical maximum of your PHP script run-time
fastcgi_read_timeout 300;
fastcgi_send_timeout 300;
server_names_hash_max_size 256000;
server_names_hash_bucket_size 512;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
log_format main '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format bytes_log "$msec $bytes_sent .";
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /opt/pifpm/sites-enabled/*.conf;
include /opt/pifpm/sites-proxied/*.conf;
}
-
Hello :) You may want to consult with the developer of the plugin you are using for assistance with this issue. Nginx is a third-party application that is not natively supported with cPanel. Thank you. 0
Please sign in to leave a comment.
Comments
1 comment