help need (convert vhost to location)

Gregory Edigarov edigarov at qarea.com
Tue Dec 15 17:42:00 UTC 2020


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




More information about the nginx mailing list