Skip to content

Instantly share code, notes, and snippets.

@tuyenv
Forked from denys281/nginx.conf
Created November 20, 2017 23:30
Show Gist options
  • Save tuyenv/92211bb7ebc0cb8e40774dde6dda7c7c to your computer and use it in GitHub Desktop.
Save tuyenv/92211bb7ebc0cb8e40774dde6dda7c7c to your computer and use it in GitHub Desktop.

Revisions

  1. @denys281 denys281 revised this gist Feb 11, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion nginx.conf
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    server {

    # Listen on port 80
    # Listen on port 81
    listen 81;

    # Server name being used (exact name, wildcards or regular expression)
  2. @denys281 denys281 created this gist Feb 11, 2014.
    45 changes: 45 additions & 0 deletions nginx.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    server {

    # Listen on port 80
    listen 81;

    # Server name being used (exact name, wildcards or regular expression)
    # server_name phpmyadmin.my;

    root /usr/share/phpmyadmin;

    # Logging
    error_log /var/log/phpmyadmin.access_log;
    access_log /var/log/phpmyadmin.error_log;


    location / {
    index index.php;
    }

    ## Images and static content is treated different
    location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
    access_log off;
    expires 360d;
    }

    location ~ /\.ht {
    deny all;
    }

    location ~ /(libraries|setup/frames|setup/libs) {
    deny all;
    return 404;
    }

    # Pass the PHP scripts to FastCGI server
    location ~ \.php$ {

    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;
    fastcgi_param HTTPS off;
    }
    }