Advertisement
alejunio93

vhost básico wordpress

Oct 16th, 2018
504
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.43 KB | None | 0 0
  1. server {
  2.         listen ip:80;
  3.         server_name suporteline.com.br;
  4.        
  5.         root /var/www/wordpress;
  6.        
  7.         index index.php;
  8.  
  9.         location = /favicon.ico {
  10.                 log_not_found off;
  11.                 access_log off;
  12.         }
  13.  
  14.         location = /robots.txt {
  15.                 allow all;
  16.                 log_not_found off;
  17.                 access_log off;
  18.         }
  19.  
  20.         location ~ ([^/]*)sitemap(.*)\.x(m|s)l$ {
  21.         rewrite ^/sitemap\.xml$ /sitemap_index.xml permanent;
  22.         rewrite ^/([a-z]+)?-?sitemap\.xsl$ /index.php?xsl=$1 last;
  23.  
  24.         rewrite ^.*/sitemap_index\.xml$ /index.php?sitemap=1 last;
  25.         rewrite ^.*/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
  26.  
  27.         rewrite ^/news_sitemap\.xml$ /index.php?sitemap=wpseo_news last;
  28.         rewrite ^/locations\.kml$ /index.php?sitemap=wpseo_local_kml last;
  29.         rewrite ^/geo_sitemap\.xml$ /index.php?sitemap=wpseo_local last;
  30.         rewrite ^/video-sitemap\.xsl$ /index.php?xsl=video last;
  31.         access_log off;
  32.         }
  33.        
  34.        
  35.         location / {
  36.                
  37.                 try_files $uri $uri/ /index.php?$args;
  38.         }
  39.  
  40.         location ~ \.php$ {
  41.                
  42.                 include fastcgi.conf;
  43.                 fastcgi_intercept_errors on;
  44.                 fastcgi_pass 127.0.0.1:9000;
  45.         }
  46.  
  47.         location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
  48.                 expires max;
  49.                 log_not_found off;
  50.         }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement