Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: NGINX vhost php problem
PostPosted: Sat Sep 18, 2010 7:29 am 
Offline

Joined: Sat Sep 18, 2010 7:24 am
Posts: 1
Hello,

I'm trying to enable phpmyadmin is an directory outside of my public_html folder however I get a problem in which it doesn't load the site.

I'd like the folder to be accessed from the following URLs:
lonelystorm/phpmyadmin
lonelystorm/phpmyadmin/
lonelystorm/phpmyadmin/*

Quote:
location ~ ^/phpmyadmin(|/.*)$ {
auth_basic "Restricted";
auth_basic_user_file /srv/www/lonelystorm.com/htpasswd;

alias /srv/www/lonelystorm.com/phpmyadmin/$1;
index index.php;

fastcgi_param HTTPS on;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/www/lonelystorm.com/phpmyadmin/$fastcgi_script_name;
include fastcgi_params;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
}


Top
   
PostPosted: Tue Sep 21, 2010 4:19 pm 
Offline
Newbie

Joined: Mon Nov 10, 2008 3:46 pm
Posts: 4
Dead6re wrote:
Hello,

I'm trying to enable phpmyadmin is an directory outside of my public_html folder however I get a problem in which it doesn't load the site.

I'd like the folder to be accessed from the following URLs:
lonelystorm/phpmyadmin
lonelystorm/phpmyadmin/
lonelystorm/phpmyadmin/*

Quote:
location ~ ^/phpmyadmin(|/.*)$ {
auth_basic "Restricted";
auth_basic_user_file /srv/www/lonelystorm.com/htpasswd;

alias /srv/www/lonelystorm.com/phpmyadmin/$1;
index index.php;

fastcgi_param HTTPS on;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/www/lonelystorm.com/phpmyadmin/$fastcgi_script_name;
include fastcgi_params;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
}


It seems that you have control of your own domain. In that case a sub-domain set-up is more straightforward. Here is my working example loosely adapted to your domain.

server {
listen 80;
server_name phpmyadmin.lonelystorm.com;
#site-specific
access_log /var/log/nginx/phpmyadmin.access.log;

location / {
root /srv/www/lonelystorm.com/phpmyadmin/;
index index.php index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
#site-specific
root /var/www/nginx-default;
}

location ~ \.php$ {
#site-specific
root /srv/www/lonelystorm.com/phpmyadmin/;
include fastcgi_params;
#site-specific
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/www/lonelystorm.com/phpmyadmin/$fastcgi_script_name;
}

}


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group