vendredi 28 juillet 2017

how config default.conf in nginx 1.13.3 for laravel 5.x

in nginx befor we change /etc/nginx/sites-available/default to

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /var/www/laravel/public;
    index index.php index.html index.htm;

    # Make site accessible from http://localhost/
    server_name <Your Domain name / Public IP Address>;

    location / {
            # First attempt to serve request as file, then
            # as directory, then fall back to displaying a 404.
            try_files $uri $uri/ /index.php?$query_string;
            # Uncomment to enable naxsi on this location
            # include /etc/nginx/naxsi.rules
    }
    location ~ \.php$ {
            try_files $uri =404;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
    }
}

but in nginx 1.13.3 how we can place this changes?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire