virtual host conf.

Wilmer Arambula tecnologiaterabyte at gmail.com
Wed Mar 8 20:57:18 UTC 2017


I'm new using nginx, I see the difference in performance, my question is
the following I have the following virtual host: example.conf

[example.conf]


# create new
server {
    listen       80;
    server_name  www.example.com;

    location / {
        root   /home/example/public_html;
        fastcgi_pass 127.0.0.1:7000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $request_filename;
        include /etc/nginx/fastcgi_params;
        fastcgi_param PATH_INFO $fastcgi_script_name;
        fastcgi_buffer_size 128k;
        fastcgi_buffers 256 4k;
        fastcgi_busy_buffers_size 256k;
        fastcgi_temp_file_write_size 256k;
        fastcgi_intercept_errors on;
        index  index.php index.html index.htm;
    }

    location /phpMyAdmin {
        root /usr/share/;
        index index.php index.html index.htm;
        location ~ ^/phpMyAdmin/(.+\.php)$ {
            try_files $uri =404;
            root /usr/share/;
            fastcgi_pass 127.0.0.1:7000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $request_filename;
            include /etc/nginx/fastcgi_params;
            fastcgi_param PATH_INFO $fastcgi_script_name;
            fastcgi_buffer_size 128k;
            fastcgi_buffers 256 4k;
            fastcgi_busy_buffers_size 256k;
            fastcgi_temp_file_write_size 256k;
            fastcgi_intercept_errors on;
        }
        location ~*
^/phpMyAdmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
            root /usr/share/;
        }
    }
}

As I can add the alias to phpMyAdmin, what would be the best way to do
that, another option would be convenient to add, I have installed nginx +
php-fpm + spawn-fcgi,

Thks,

-- 
*Wilmer Arambula.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170308/40de3e06/attachment.html>


More information about the nginx mailing list