Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Rails site being served by nginx. I want to also have phpmyadmin for the same data. My phpmyadmin is installed in /use/share/phpMyAdmin

I wrote this in in my nginx.conf file:

    server {
     listen 80;
     server_name mysite.com mysite.org ;
     root /home/dbadmin/mysite_r_3_1_1/public;
     rails_env development;
     passenger_enabled on;
     client_max_body_size 500M;
     client_body_buffer_size 256k;
    }
    server {
      listen 80;
      server_name phpmyadmin.mysite.org phpmyadmin.mysite.com ;
      root /usr/share/phpmMyAdmin;
      index index.php;
    }

My regular site is available at mysite.com and mysite.org. If I go to phpmyadmin.mysite.org or phpmyadmin.mysite.com the browser says it can't find the server. Also, nothing shows up in my nginx access.log or errors.log either regarding the attempt at phpmyadmin.mysite.com. I have restarted the nginx server after the update to nginx.conf.

Update 1: also, is there a way of knowing if there is some firewall somewhere preventing me from going to my newly created phpmyadmin. subdomain?

Update 2: I tried to have a subdomain because I don't know how to not have mysite.com/phpmyadmin not interfere with the Rails URL routing on the main application.

share|improve this question
1  
Did you add phpmyadmin.mysite.org to DNS? –  Alan Shutko Oct 19 '12 at 17:27
    
@AlanShutko, that must be part of it! Ok, just to try it out, can I use an IP address to get to it. Something like phpmyadmin.10.10.10.10 if 10.10.10.10 is the ip address of mysite.com? –  highBandWidth Oct 19 '12 at 18:05
1  
No, you won't be able to just use an IP address. You need to go by hostname since the web server will use the Host parameter to determine which site to show. However, you should be able to edit the hosts file on your OS of choice to try it out locally before changing DNS. –  Alan Shutko Oct 19 '12 at 18:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.