Pyrocms
[edit] pyrocms
Edit /installer/config/config.php:
$config['index_page'] = ""; $config['uri_protocol'] = "REQUEST_URI";
Edit /system/cms/config/config.php
$config['index_page'] = ""; $config['uri_protocol'] = "REQUEST_URI";
server { 聽聽聽聽聽聽聽聽listen 80; 聽聽聽聽聽聽聽聽server_name domain.com; 聽聽聽聽聽聽聽聽root /path/to/webroot; 聽聽聽聽聽聽聽聽index index.php; 聽 聽聽聽聽聽聽聽聽access_log聽 /path/to/logs/access.log聽 main; 聽聽聽聽聽聽聽聽error_log聽 /path/to/logs/error.log; 聽 聽聽聽聽聽聽聽聽client_max_body_size 200M; 聽 聽聽聽聽聽聽聽聽gzip聽 on; 聽聽聽聽聽聽聽聽gzip_static on; 聽聽聽聽聽聽聽聽gzip_http_version 1.0; 聽聽聽聽聽聽聽聽gzip_disable "MSIE [1-6]."; 聽聽聽聽聽聽聽聽gzip_vary on; 聽 聽聽聽聽聽聽聽聽gzip_comp_level 9; 聽聽聽聽聽聽聽聽gzip_proxied any; 聽聽聽聽聽聽聽聽gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; 聽 聽聽聽聽聽聽聽聽fastcgi_buffers 8 16k; 聽聽聽聽聽聽聽聽fastcgi_buffer_size 32k; 聽聽聽聽聽聽聽聽fastcgi_read_timeout 180; 聽 聽聽聽聽聽聽聽聽location / { 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽try_files $uri $uri/ /index.php; 聽聽聽聽聽聽聽聽} 聽 聽聽聽聽聽聽聽聽聽location /installer { 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽try_files $uri $uri/ /installer/index.php; 聽聽聽聽聽聽聽聽} 聽 聽聽聽聽聽聽聽聽fastcgi_intercept_errors off; 聽 聽聽聽聽聽聽聽聽location ~* .(?:ico|css|js|gif|jpe?g|png)$ { 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽expires max; 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽add_header Pragma public; 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽add_header Cache-Control "public, must-revalidate, proxy-revalidate"; 聽聽聽聽聽聽聽聽} 聽 聽聽聽聽聽聽聽聽location ~ .php { 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽fastcgi_pass聽聽 unix:/tmp/domain.sock; 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽fastcgi_split_path_info ^(.+.php)(.*)$; 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽fastcgi_param聽 SCRIPT_FILENAME聽 $document_root$fastcgi_script_name; 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽include聽聽聽聽聽聽聽 fastcgi_params; 聽聽聽聽聽聽聽聽} 聽 聽聽聽聽聽聽聽聽include drop.conf; }
Fastcgi Params:
fastcgi_param聽 QUERY_STRING聽聽聽聽聽聽 $query_string; fastcgi_param聽 REQUEST_METHOD聽聽聽聽 $request_method; fastcgi_param聽 CONTENT_TYPE聽聽聽聽聽聽 $content_type; fastcgi_param聽 CONTENT_LENGTH聽聽聽聽 $content_length; 聽 fastcgi_param聽 SCRIPT_NAME聽聽聽聽聽聽聽 $fastcgi_script_name; fastcgi_param聽 REQUEST_URI聽聽聽聽聽聽聽 $request_uri; fastcgi_param聽 DOCUMENT_URI聽聽聽聽聽聽 $document_uri; fastcgi_param聽 DOCUMENT_ROOT聽聽聽聽聽 $document_root; fastcgi_param聽 SERVER_PROTOCOL聽聽聽 $server_protocol; 聽 fastcgi_param聽 GATEWAY_INTERFACE聽 CGI/1.1; fastcgi_param聽 SERVER_SOFTWARE聽聽聽 nginx/$nginx_version; 聽 fastcgi_param聽 REMOTE_ADDR聽聽聽聽聽聽聽 $remote_addr; fastcgi_param聽 REMOTE_PORT聽聽聽聽聽聽聽 $remote_port; fastcgi_param聽 SERVER_ADDR聽聽聽聽聽聽聽 $server_addr; fastcgi_param聽 SERVER_PORT聽聽聽聽聽聽聽 $server_port; fastcgi_param聽 SERVER_NAME聽聽聽聽聽聽聽 $server_name; 聽 # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param聽 REDIRECT_STATUS聽聽聽 200; 聽 fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; fastcgi_intercept_errors off;
drop.conf
location = /robots.txt聽 { access_log off; log_not_found off; } location = /favicon.ico { access_log off; log_not_found off; } location ~ /.聽聽聽聽聽聽聽聽聽 { access_log off; log_not_found off; deny all; } location ~ ~$聽聽聽聽聽聽聽聽聽聽 { access_log off; log_not_found off; deny all; }
PHP-FPM Pool (If using PHP-FPM with unix sockets)
[domain] listen = /tmp/domain.sock listen.allowed_clients = 127.0.0.1 聽 user = someuser group = someuser 聽 pm = dynamic 聽 pm.max_children = 25 pm.start_servers = 2 pm.min_spare_servers = 2 pm.max_spare_servers = 25 聽 php_admin_value[error_log] = /var/log/php-fpm/domain-error.log php_admin_flag[log_errors] = on php_admin_value[session.save_path] = /tmp/