Odd 2.1.6 + Nginx (Full) Behaviour


  • | 3523 points

    I've done the following:

    1. Created "mary.dev" as a symfony project;

    I fiddled the configuration to auto.mary.dev.conf in laragon/etc/nginx/sites-enabled/auto.mary.dev.conf to:

    server {
    listen 80;
    server_name mary.dev *.mary.dev;
    root "C:/laragon/www/mary/web";

    index app_dev.php app.php;
    
    location / {
        try_files $uri $uri/ /app_dev.php$is_args$args;
    }
    
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass php_upstream;
        #fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }
    
    
    charset utf-8;
    
    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }
    location ~ /\.ht { deny all; }
    }
    

    There are some comments below this but I'm fighting with the markup editor atm.

    Despite reloading and such Laragon didn't change it...but why not?

    So I then make "shane.dev", again a symfony application with auto.shane.dev.conf:

    server {
    listen 80;
    server_name shane.dev *.shane.dev;
    root "C:/laragon/www/shane/web/";

    index app_dev.php app.php;
    
    location / {
        try_files $uri $uri/ /app_dev.php$is_args$args;
    }
    
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass php_upstream;
        #fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }
    
    
    charset utf-8;
    
    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }
    location ~ /\.ht {        deny all;    }
    }
    

    But for unexplained reasons this one insists on pointing to the c:\laragon\www route - yet if I meddle with its configuration by putting rubbish (e.g. hfdkjsfhdkjshfdkjshfdskjhfds) somewhere, an Nginx reload DOES complain about the rubbish configuration....so it seems Laragon/nginx are picking up any changes.

    I just created a Laravel 7z site and it's going to the main Laragon page too - it's as though the very first found server/location section works but nothing else seems to do so?

    DSL


  • | 3523 points

    Interestingly, I just threw out the Nginx 2.1.6 and installed the 2.1.6 + Apache version and when I "fixed" the DocumentRoots for both, this now works. Truly odd :)


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.