The web design and pages for my personal website.
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.
 
 
 
 

100 lines
2.3 KiB

  1. server {
  2. server_name www.kirsle.net;
  3. listen 443 ssl;
  4. listen [::]:443 ssl;
  5. index index.cgi index.php index.html index.htm;
  6. access_log /home/kirsle/logs/access_log;
  7. error_log /home/kirsle/logs/error_log;
  8. ssl on;
  9. ssl_certificate /etc/letsencrypt/live/www.kirsle.net/fullchain.pem;
  10. ssl_certificate_key /etc/letsencrypt/live/www.kirsle.net/privkey.pem;
  11. include ssl_params;
  12. root /home/kirsle/git/rophako;
  13. location /static {
  14. alias /home/kirsle/www/static;
  15. }
  16. location /creativity {
  17. alias /home/kirsle/www/creativity;
  18. }
  19. location /doc {
  20. alias /home/kirsle/www/doc;
  21. }
  22. location /images {
  23. alias /home/kirsle/www/images;
  24. }
  25. location /mail {
  26. alias /home/kirsle/www/mail;
  27. }
  28. location /piwik {
  29. alias /home/kirsle/www/piwik;
  30. index index.php;
  31. }
  32. location /projects {
  33. alias /home/kirsle/www/projects;
  34. }
  35. location /wizards {
  36. alias /home/kirsle/www/wizards;
  37. }
  38. location /favicon.ico {
  39. alias /home/kirsle/www/favicon.ico;
  40. }
  41. # uwsgi
  42. location / {
  43. proxy_set_header Host $host;
  44. proxy_set_header X-Real-IP $remote_addr;
  45. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  46. proxy_set_header X-Forwarded-Proto https;
  47. proxy_redirect off;
  48. proxy_pass http://127.0.0.1:9000;
  49. }
  50. # run php scripts
  51. location ~ \.php$ {
  52. include fastcgi_params;
  53. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  54. fastcgi_pass unix:/var/run/php5-fpm.sock;
  55. fastcgi_index index.php;
  56. fastcgi_param SCRIPT_FILENAME /home/kirsle/www$fastcgi_script_name;
  57. }
  58. # legacy CGI scripts
  59. # https://wiki.debian.org/nginx/FastCGI
  60. location ~ \.cgi$ {
  61. try_files $uri $uri/ /index.cgi;
  62. gzip off;
  63. root /home/kirsle/public_html;
  64. fastcgi_pass unix:/var/run/fcgiwrap.socket;
  65. include fastcgi_params;
  66. fastcgi_param SERVER_NAME $host;
  67. }
  68. }
  69. # Legacy kirsle domains over port 80
  70. server {
  71. server_name kirsle.net www.kirsle.net .kirsle.com .kirsle.org .cuvou.com .cuvou.net .cuvou.org ckir.net .ckir.net;
  72. listen 80;
  73. listen [::]:80;
  74. return 301 https://www.kirsle.net$request_uri;
  75. }
  76. # SSL, but wrong domain
  77. server {
  78. server_name kirsle.net .kirsle.com .kirsle.org;
  79. listen [::]:443 ssl;
  80. listen 443 ssl;
  81. ssl on;
  82. ssl_certificate /etc/letsencrypt/live/www.kirsle.net/fullchain.pem;
  83. ssl_certificate_key /etc/letsencrypt/live/www.kirsle.net/privkey.pem;
  84. include ssl_params;
  85. return 301 https://www.kirsle.net$request_uri;
  86. }