Skip to content

Instantly share code, notes, and snippets.

@LeCoupa
Last active November 8, 2023 23:26
Show Gist options
  • Select an option

  • Save LeCoupa/e29a457841dc4dd60006 to your computer and use it in GitHub Desktop.

Select an option

Save LeCoupa/e29a457841dc4dd60006 to your computer and use it in GitHub Desktop.

Revisions

  1. LeCoupa revised this gist Nov 10, 2017. No changes.
  2. Julien Le Coupanec revised this gist Nov 7, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions wordpress.nginx
    Original file line number Diff line number Diff line change
    @@ -25,6 +25,8 @@ server {
    ssl_certificate /etc/nginx/ssl/hackisition.com.crt;
    ssl_certificate_key /etc/nginx/ssl/hackisition.com.key;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # do not use SSLv3 ref: POODLE

    client_max_body_size 20M;

    location / {
    try_files $uri $uri/ /index.php;
  3. Julien Le Coupanec created this gist Nov 6, 2014.
    50 changes: 50 additions & 0 deletions wordpress.nginx
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,50 @@
    ##
    # @server studio
    # @host hackisition.com
    # @desc nginx host rules
    # @author Julien Le Coupanec <[email protected]>
    ##

    # HTTP Server
    server {
    listen 80;
    server_name hackisition.com www.hackisition.com;
    rewrite ^ https://$server_name$request_uri permanent;
    }

    # HTTPS Server
    server {
    listen 443;
    server_name hackisition.com www.hackisition.com;

    root /var/www;
    index index.php;
    error_log /var/log/nginx/hackisition.com.log crit;

    ssl on;
    ssl_certificate /etc/nginx/ssl/hackisition.com.crt;
    ssl_certificate_key /etc/nginx/ssl/hackisition.com.key;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # do not use SSLv3 ref: POODLE

    location / {
    try_files $uri $uri/ /index.php;
    }

    location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
    }

    location /doc/ {
    alias /usr/share/doc/;
    autoindex on;
    allow 127.0.0.1;
    deny all;
    }

    location ~/\.ht {
    deny all;
    }
    }