Welcome! Log In Create A New Profile

Advanced

nginx phpmyadmin alias

Posted by wwwUSER 
nginx phpmyadmin alias
August 13, 2009 02:28AM
Подскажите пожалуйста как корректно реализовать алиас в nginx, чтобы при запросе http://SomeSite/phpmyadmin/ запускался phpMyAdmin, при условии что он находиться в /usr/local/www/phpMyAdmin/

конфиг прилагается

user www www;
worker_processes 2;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

sendfile on;

keepalive_timeout 65;

gzip on;

server {
listen 80;
server_name localhost;

location / {
root /usr/local/www/nginx;
index index.html index.htm;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/nginx-dist;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass unix:/tmp/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME //usr/local/www/nginx$fastcgi_script_name;
include fastcgi_params;
}

}
}
Re: nginx phpmyadmin alias
April 16, 2010 03:42PM
httpd.conf:
Alias /pma /usr/share/phpmyadmin

nginx.conf:
location /pma/ {
proxy_pass http://127.0.0.1:82;
}

Ну у меня лично так настроено :)
Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 62
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