server {
listen 80;
server_name cubieboard.no-ip.org;
root /usr/share/nginx/www;
index index.php;
client_max_body_size 30M;
location / {
root /usr/share/nginx/www;
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_ignore_client_abort on;
fastcgi_param SERVER_NAME $http_host;
}
location ~ /\.ht {
deny all;
}
location ~* \.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$ {
expires 1d;
access_log on;
}
}
This question has been answered by opengeek. See the first response.
location @modx-rewrite {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
location / {
try_files $uri $uri/ @modx-rewrite;
}
server {
listen 80;
server_name localhost;
root /usr/share/nginx/www;
index index.php;
client_max_body_size 30M;
location @modx-rewrite {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
location / {
try_files $uri $uri/ @modx-rewrite;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_ignore_client_abort on;
fastcgi_param SERVER_NAME $http_host;
}
location ~ /\.ht {
deny all;
}
location ~* \.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$ {
expires 30d;
access_log off;
}
}
rewrite ^/(.*)$ /index.php?q=$1 last;
location ~* \.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$ {
expires 30d;
access_log off;
}You said you deleted the ContentType for .html? You mean in MODX? That would actually [u]break everything... [/u]