: Forum index page shows logged out even when logged in. Caching or cookie issue? I'm running Nginx with modpagespeed served by CloudFlare DNS for my forum website. Cookies seem to hold, but the
I'm running Nginx with modpagespeed served by CloudFlare DNS for my forum website.
Cookies seem to hold, but the forum index itself shows you're logged out when you're logged in, unless you append /index.php to the forums/ . I suppose it's caching, but not sure what to do about it.
This is an IPS Community Suite forum, not connected to my wordpress install.
My nginx is as follows
nginx.conf
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 19000;
use epoll;
multi_accept on;
}
worker_rlimit_nofile 20000;
http {
include mime.types;
default_type application/octet-stream;
fastcgi_cache_path /usr/local/nginx-cache levels=1:2 keys_zone=phpcache:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
log_format main '$remote_addr - $remote_user [$time_local] "$request "'
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/null;
error_log /dev/null;
include /usr/local/nginx/apps/pagespeed/core.conf;
add_header Vary "Accept-Encoding";
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
map $scheme $fastcgi_https { ## Detect when HTTPS is used
default off;
https on;
}
keepalive_timeout 10;
keepalive_requests 100000;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
autoindex off;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
client_max_body_size 60m;
client_body_buffer_size 10K;
client_header_buffer_size 1k;
large_client_header_buffers 4 32k;
open_file_cache max=200000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
gzip on;
gzip_comp_level 2;
gzip_proxied any;
gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon image/webp application/json application/vnd.ms-access application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint application/x-shockwave-flash image/tiff application/x-font-ttf audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_vary on;
include /usr/local/nginx/sites-enabled/*;
}
php.conf
location ~ .php$ {
add_header Vary "Accept-Encoding";
add_header X-Served-By $hostname;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Fastcgi-Cache $upstream_cache_status;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param MAGE_RUN_TYPE website;
fastcgi_param MAGE_RUN_CODE base;
fastcgi_cache phpcache;
fastcgi_cache_valid 200 30m;
fastcgi_cache_methods GET HEAD;
fastcgi_cache_bypass $no_cache;
fastcgi_no_cache $no_cache;
include /usr/local/nginx/conf/fastcgi_params;
}
site.conf
server {
listen 80;
listen [::]:80;
server_name nybodyart.com nybodyart.com; return 301 nybodyart.com$request_uri; }
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
pagespeed SslCertFile /usr/local/nginx/ssl/nybodyart.com-fullchain1.pem;
ssl_certificate /usr/local/nginx/ssl/nybodyart.com-fullchain1.pem;
ssl_certificate_key /usr/local/nginx/ssl/nybodyart.com-privkey1.pem;
include /usr/local/nginx/conf/ssl-full.conf;
server_name nybodyart.com;
root /home/nyba/public_html;
set $no_cache 0;
access_log /dev/null;
error_log /dev/null;
location = /favicon.ico {
try_files $uri =204;
}
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$args;
expires 7d;
}
location @forums {
rewrite ^/forums(.*) /forums/index.php?q=;
}
location ^~ /forums {
root /home/nyba/public_html;
index index.php index.html index.htm;
try_files $uri $uri/ @forums ;
location ~ ^/applications/(blog|calendar|chat|cms|core|downloads|forums|gallery|nexus|pastebin|companydirectory|rules|videos|notes|iawards|links|pmviewer|readthattopic|rules)/interface/.*.(?:phpd*|phtml)$ {
allow all;
include /usr/local/nginx/conf/php.conf;
}
location ~ ^/(uploads|datastore|system|plugins)/.*.(?:phpd*|phtml)$ {
allow 127.0.0.1;
deny all;
}
location ~ ^/applications/(blog|calendar|chat|cms|core|downloads|forums|gallery|nexus|pastebin|companydirectory|rules|videos|notes|iawards|links|pmviewer|readthattopic|rules)/.*.(?:phpd*|phtml)$ {
allow 127.0.0.1;
deny all;
}
include /usr/local/nginx/conf/php.conf;
}
location @directory {
rewrite ^/directory(.*) /directory/index.php?q=;
}
location ^~ /directory {
root /home/nyba/public_html;
index index.php index.html index.htm;
try_files $uri $uri/ @directory ;
include /usr/local/nginx/conf/php.conf;
}
include /usr/local/nginx/apps/pagespeed/optimize.conf;
include /usr/local/nginx/conf/cache.conf;
include /usr/local/nginx/conf/php.conf;
include /usr/local/nginx/conf/wordpress.conf;
}
More posts by @Gretchen104
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.