You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
428 B

  1. server {
  2. listen 80 default_server;
  3. root /var/www/wx;
  4. index index.php index.html index.htm index.nginx-debian.html;
  5. autoindex on;
  6. server_name wx.home;
  7. location / {
  8. try_files $uri $uri/ =404;
  9. }
  10. location ~ \.php$ {
  11. include snippets/fastcgi-php.conf;
  12. fastcgi_pass unix:/var/run/php/php-fpm.sock;
  13. }
  14. # Rewrite the old path yyyy/mm/dd/ to /images/
  15. rewrite "^/image/\d{4}/\d{2}/\d{2}/(.+)$" /images/$1 permanent;
  16. }