social.conf 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ## Configuração para social5dgegf5a7k.onion
  2. ## Tor
  3. server {
  4. listen 127.0.0.1:42909;
  5. allow 127.0.0.1;
  6. deny all;
  7. add_header X-Frame-Options SAMEORIGIN;
  8. add_header X-Content-Type-Options nosniff;
  9. server_name social5dgegf5a7k.onion;
  10. root /var/www/git/social.pirata.xyz;
  11. index index.php;
  12. location ~* \.php$ {
  13. #include snippets/fastcgi-php.conf;
  14. try_files $uri $uri/ /index.php;
  15. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  16. fastcgi_pass unix:/var/run/php5-fpm-social.sock;
  17. include fastcgi_params;
  18. fastcgi_index index.php;
  19. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  20. fastcgi_read_timeout 300;
  21. }
  22. #add_header X-Frame-Options DENY;
  23. add_header X-Content-Type-Options nosniff;
  24. ## Location
  25. location / {
  26. try_files $uri $uri/ @gnusocial;
  27. }
  28. ## Fancy URLs
  29. location @gnusocial {
  30. rewrite ^(.*)$ /index.php?p=$1 last;
  31. break;
  32. }
  33. ## Restrict access that is unnecessary anyway
  34. location ~ /\.(ht|git) {
  35. deny all;
  36. }
  37. location ~* ^/(.*)\.(ico|css|js|gif|png|jpg|bmp|JPG|jpeg)$ {
  38. root /var/www/git/social.pirata.xyz;
  39. rewrite ^/(.*)$ /$1 break;
  40. access_log off;
  41. expires max;
  42. }
  43. }
  44. server {
  45. listen 127.0.0.1:42902;
  46. allow 127.0.0.1;
  47. deny all;
  48. add_header X-Frame-Options SAMEORIGIN;
  49. add_header X-Content-Type-Options nosniff;
  50. server_name ro4a6wyb4bjqpqgg.onion;
  51. return 301 http://social5dgegf5a7k.onion$request_uri;
  52. }