Nginx Configuration Problems
This is what I currently have in my configuration files;
/nginx/sites-available/myurl.com
server {
server_name http://www.myurl.com myurl.com;
root /home/tyrx/domains/myurl.com/public_html;
access_log /home/tyrx/domains/myurl.com/logs/access.log;
error_log /home/tyrx/domains/myurl.com/logs/error.log;
location / {
try_files $uri $uri/ /index.php?$uri&$args;
index index.php index.html;
}
location /internal_data/ {
internal;
}
location /library/ {
internal;
}
location ~ \.php$ {
try_files $uri /index.php
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
/nginx/sites-enabled/myurl.com - this is the syslink which I created using the “ln –s” command
#####
server {
server_name www.myurl.com myurl.com;
root /home/tyrx/domains/myurl.com/public_html;
access_log /home/tyrx/domains/myurl.com/logs/access.log;
error_log /home/tyrx/domains/myurl.com/logs/error.log;
location / {
try_files $uri $uri/ /index.php?$uri&$args;
index index.php index.html;
}
location /internal_data/ {
internal;
}
location /library/ {
internal;
}
location ~ \.php$ {
try_files $uri /index.php
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
This is my /etc/nginx/nginx.conf file -
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
# Basic Settings
client_max_body_size 50m;
client_header_timeout 5;
keepalive_timeout 5;
port_in_redirect off;
sendfile on;
server_tokens off;
server_name_in_redirect off;
tcp_nopush on;
tcp_nodelay on;
types_hash_max_size 2048;
# MIME
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Logging Settings
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log warn;
# Gzip Settings
gzip on;
gzip_disable "msie6";
gzip_min_length 1400;
gzip_types text/plain text/css text/javascript text/xml application/x-javascript application/xml applicatio$
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
I was going to post this on the xenforo forums but I figure it's most likely a problem with my inexperience with Linux rather than that of Xenforo so I think these forums would be more appropriate. It's also worth mentioning that my website works with the default configuration and it's only when I attempt adding these rules for friendly URLs that this problem occurs.