[ubuntu-ar] Configuracion Nginx
Zeroadrenaline
zeroadrenalinux at gmail.com
Tue Jan 10 03:20:33 UTC 2012
On 09/01/12 20:35, Claudio Ceballos Paz wrote:
> Hola, Amigos.
> Tengo la siguiente situación que no puedo solucionar. Tengo instalado
> Ubuntu Server 10.04 LTS. Con nginx + php-fmp + mysql.
> El server funciona correctamente, lo probé con info(), y me da todo ok.
> El problema ocurre cuando instalo phpmyadmin. Se instala
> correctamente, pero para acceder debo configurarlo en otro puerto.
> Como puedo lograr tener mas de un server configurado ambos en el
> puerto 80?
>
> Es decir, que quiero acceder a mi sitio mediante
> http://midominio.
>
> y quiero acceder a http://midominio/phpmyadmin al phpmyadmin.
>
> Les paso cuales son las configuraciones que tengo:
>
> Archivo default:
>
> # You may add here your
> # server {
> #...
> # }
> # statements for each of your virtual hosts
>
> server {
> listen 80 default;
> server_name localhost;
>
> access_log /var/log/nginx/localhost.access.log;
>
> location / {
> root /var/www/nginx-default;
> index index.html index.htm;
> }
>
> location /doc {
> root /usr/share;
> autoindex on;
> allow 127.0.0.1;
> deny all;
> }
>
> location /images {
> root /usr/share;
> autoindex on;
> }
>
> #error_page 404 /404.html;
>
> # redirect server error pages to the static page /50x.html
> #
> #error_page 500 502 503 504 /50x.html;
> #location = /50x.html {
> #root /var/www/nginx-default;
> #}
>
> # proxy the PHP scripts to Apache listening on 127.0.0.1:80
> <http://127.0.0.1:80>
> #
> #location ~ \.php$ {
> #proxy_pass http://127.0.0.1;
> #}
>
> # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
> <http://127.0.0.1:9000>
> #
> location ~ \.php$ {
> fastcgi_pass 127.0.0.1:9000 <http://127.0.0.1:9000>;
> fastcgi_index index.php;
> fastcgi_param SCRIPT_FILENAME
> /var/www/nginx-default$fastcgi_script_name;
> include fastcgi_params;
> }
>
> # deny access to .htaccess files, if Apache's document root
> # concurs with nginx's one
> #
> location ~ /\.ht {
> deny all;
> }
> }
>
>
> # another virtual host using mix of IP-, name-, and port-based
> configuration
> #
> #server {
> #listen 8000;
> #listen somename:8080;
> #server_name somename alias another.alias;
>
> #location / {
> #root html;
> #index index.html index.htm;
> #}
> #}
>
>
> # HTTPS server
> #
> #server {
> #listen 443;
> #server_name localhost;
>
> #ssl on;
> #ssl_certificate cert.pem;
> #ssl_certificate_key cert.key;
>
> #ssl_session_timeout 5m;
>
> #ssl_protocols SSLv2 SSLv3 TLSv1;
> #ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
> #ssl_prefer_server_ciphers on;
>
> #location / {
> #root html;
> #index index.html index.htm;
> #}
> #}
>
> Archivo phpmyadmin:
>
>
> listen 80;
> server_name phpmyadmin;
> access_log /var/log/phpmyadmin.access_log;
> error_log /var/log/phpmyadmin.error_log;
> location /{
> root /usr/share/phpmyadmin;
> index index.php;
> }
> location ~ \.php$ {
> fastcgi_pass 127.0.0.1:9000 <http://127.0.0.1:9000>;
> fastcgi_index index.php;
> fastcgi_param SCRIPT_FILENAME
> /usr/share/phpmyadmin$fastcgi_script_name;
> include fastcgi_params;
> }
> }
>
> Saludos, Gracias.
>
>
En principio, con localizar el "DocumentRoot" (no se que nomenclatura
usa tu HTTPD) y tirar todos los src de phpmyadmin deberias poder hacer eso.
Pero te recomiendo que leas si tu httpd permite hacer VirtualHosting,
eso es la forma correcta de hacer lo que estas pidiendo.
http://wiki.nginx.org/VirtualHostExample
--
+-----------------------------------+
| ZEROADRENALINE |
| System Administrator |
| zeroadrenalinux en gmail.com |
| www.zeroadrenaline.com |
+-----------------------------------+
------------ pr?xima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <https://lists.ubuntu.com/archives/ubuntu-ar/attachments/20120110/0c7f14ca/attachment.html>
More information about the Ubuntu-ar
mailing list