Welcome! Log In Create A New Profile

Advanced

help need (convert vhost to location)

Gregory Edigarov
December 15, 2020 12:44PM
Hello everybody,

I have this server section:

server {
    server_name postmaster.example.com;
    listen 80;

    access_log   /var/log/nginx/vexim-access.log;
    error_log    /var/log/nginx/vexim-error.log;

    root /var/www/vexim/vexim;
    index index.php index.htm index.html;

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


    location ~* \.php$ {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        if (!-f $document_root$fastcgi_script_name) {return 404;}
        fastcgi_pass  unix:/run/php/php7.3-fpm-postmaster.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}


this is working correctly.
 
now I need to convert this virtual server to location.
i.e. to be called from postmaster.example.com/control/

how could this be achieved?

thank you.
--
With best regards,
     Gregory Edigarov


_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

help need (convert vhost to location)

Gregory Edigarov December 15, 2020 12:44PM

Re: help need (convert vhost to location)

Francis Daly December 26, 2020 02:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 56
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready