Golden Falcon Posted August 12, 2014 Share Posted August 12, 2014 Hello, What is the current good working friendly URL server block for nginx that works with IPB? Link to comment Share on other sites More sharing options...
Pross22 Posted August 12, 2014 Share Posted August 12, 2014 This is what we use... we have urls such as: forum.xxxxxxx.com/topic/22556-error-with-new-section-letters/ server { listen 80; server_name forum.xxxxxxx.com; access_log /var/log/nginx/forum.access.log; error_log /var/log/nginx/forum.error.log; root /srv/www/forum/; index index.php index.html; location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location / { try_files $uri $uri/ /index.php?$uri&$args; rewrite ^ /index.php? last; } location ~ .php$ { #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini include fastcgi_params; fastcgi_intercept_errors on; fastcgi_pass 127.0.0.1:9000; } location ~* .(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; } } Link to comment Share on other sites More sharing options...
Ae9803 Posted September 6, 2014 Share Posted September 6, 2014 Hello, This great! But Im still not sure where this portion goes, # You may add here your # server { # ... # } # statements for each of your virtual hosts to this file ## # You should look at the following URL's in order to grasp a solid understanding # of Nginx configuration files in order to fully unleash the power of Nginx. # http://wiki.nginx.org/Pitfalls # http://wiki.nginx.org/QuickStart # http://wiki.nginx.org/Configuration # # Generally, you will want to move this file somewhere, and start with a clean # file but keep this around for reference. Or just disable in sites-enabled. # # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. ## server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.php index.html index.htm; # Make site accessible from http://localhost/ server_name http://www.xxx.com; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; # Uncomment to enable naxsi on this location # include /etc/nginx/naxsi.rules } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } location ~ .php$ { try_files $uri =404; fastcgi_split_path_info ^(.+.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests #location /RequestDenied { # proxy_pass http://127.0.0.1:8080; #} #error_page 404 /404.html; Link to comment Share on other sites More sharing options...
Ae9803 Posted September 29, 2014 Share Posted September 29, 2014 Any one know? Link to comment Share on other sites More sharing options...
Grumpy Posted September 29, 2014 Share Posted September 29, 2014 Are you asking where your nginx configs are? For centos/rhel's yum installation, it is /etc/nginx/nginx.conf which should already exist for you. You can setup separate files for vhosts and other portions too. Link to comment Share on other sites More sharing options...
Ae9803 Posted September 30, 2014 Share Posted September 30, 2014 I was able to figure it out! I just wasnt sure where to place it in the vhosts files :) Thanks Grumpy! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.