Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.96 KB | None | 0 0
  1. ##
  2. # You should look at the following URL's in order to grasp a solid understanding
  3. # of Nginx configuration files in order to fully unleash the power of Nginx.
  4. # http://wiki.nginx.org/Pitfalls
  5. # http://wiki.nginx.org/QuickStart
  6. # http://wiki.nginx.org/Configuration
  7. #
  8. # Generally, you will want to move this file somewhere, and start with a clean
  9. # file but keep this around for reference. Or just disable in sites-enabled.
  10. #
  11. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  12. ##
  13.  
  14. # Default server configuration
  15. #
  16. server {
  17.         listen 80 default_server;
  18.         listen [::]:80 default_server;
  19.  
  20.         # SSL configuration
  21.         #
  22.         listen 443 ssl default_server;
  23.         listen [::]:443 ssl default_server;
  24.         #
  25.         # Note: You should disable gzip for SSL traffic.
  26.         # See: https://bugs.debian.org/773332
  27.         #
  28.         # Read up on ssl_ciphers to ensure a secure configuration.
  29.         # See: https://bugs.debian.org/765782
  30.         #
  31.         # Self signed certs generated by the ssl-cert package
  32.         # Don't use them in a production server!
  33.         #
  34.         # include snippets/snakeoil.conf;
  35.         ssl on;
  36.         ssl_certificate /etc/nginx/ssl/my-ssl-crt.crt;
  37.         ssl_certificate_key /etc/nginx/ssl/my-server-key.key;
  38.         ssl_prefer_server_ciphers on;
  39.  
  40.         root /var/www/html;
  41.  
  42.         # Add index.php to the list if you are using PHP
  43.         index index.html index.htm index.nginx-debian.html;
  44.  
  45.         server_name asaadam.me wwww.asaadam.me;
  46.  
  47.         location / {
  48.                 # First attempt to serve request as file, then
  49.                 # as directory, then fall back to displaying a 404.
  50.                 try_files $uri $uri/ =404;
  51.             # proxy_pass http://localhost:8080;
  52.             # proxy_http_version 1.1;
  53.             # proxy_set_header Upgrade $http_upgrade;
  54.             # proxy_set_header Connection 'upgrade';
  55.             # proxy_set_header Host $host;
  56.             # proxy_cache_bypass $http_upgrade;
  57.         }
  58.  
  59.         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  60.         #
  61.         #location ~ \.php$ {
  62.         #       include snippets/fastcgi-php.conf;
  63.         #
  64.         #       # With php7.0-cgi alone:
  65.         #       fastcgi_pass 127.0.0.1:9000;
  66.         #       # With php7.0-fpm:
  67.         #       fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  68.         #}
  69.  
  70.         # deny access to .htaccess files, if Apache's document root
  71.         # concurs with nginx's one
  72.         #
  73.         #location ~ /\.ht {
  74.         #       deny all;
  75.         #}
  76. }
  77.  
  78.  
  79. # Virtual Host configuration for example.com
  80. #
  81. # You can move that to a different file under sites-available/ and symlink that
  82. # to sites-enabled/ to enable it.
  83. #
  84. #server {
  85. #       listen 80;
  86. #       listen [::]:80;
  87. #
  88. #       server_name example.com;
  89. #
  90. #       root /var/www/example.com;
  91. #       index index.html;
  92. #
  93. #       location / {
  94. #               try_files $uri $uri/ =404;
  95. #       }
  96. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement