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.
 
 
 
 

101 lines
2.3 KiB

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