jcadima
6/5/2018 - 4:15 PM

Laravel nginx config , no HTTPS



server {
    listen 80;

    root /var/www/html/hotvue/public;

    index index.php index.html index.htm index.php;

    server_name hotvue.com;

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

    location ~ \.php$ {
       include snippets/fastcgi-php.conf;
       fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
    }

    location /phpmyadmin {
        root /usr/share/;
        index index.php;
        try_files $uri $uri/ =404;

        location ~ ^/phpmyadmin/(doc|sql|setup)/ {
          deny all;
        }

        location ~ /phpmyadmin/(.+\.php)$ {
          fastcgi_pass unix:/run/php/php7.1-fpm.sock;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          include fastcgi_params;
          include snippets/fastcgi-php.conf;
        }
    }


}
~