Score:0

All subdomains except mail domain work, is there something I need to change?

do flag

I recently started hosting a website with Apache with friends and made a few subdomains for each persons' area. I did the DNS records and all of them work and reverse proxy to the correct subdomain.... all except for mail. No matter whether I put in the actual email server or just my test subdomain for the reverse proxy, it always comes back with ERR_CONNECTION_REFUSED. I have tried everything from switching the document roots to a subdomain that I know works and to ports that I know are being properly handled, but mail just doesn't seem to want to cooperate. I have Linked an abridged version of my main conf file below. The ports.conf has it listening to the ports being used as well.

 <VirtualHost *:80>                                                                                                                                                                                                                                   
  ServerName mail.my-site.com                                                                                                                                                                                                               
  DocumentRoot "/var/www/email/"                                                                                                                                                                                                                                                                                                                                                                                                                                               
  ProxyPass "/" "http://127.0.0.1:8080/"                                                                                                                                                                                                       
  ProxyPassReverse "/" "http://127.0.0.1:8080/"                                                                                                                                                                                                                                                                                                                                                                                                                                             
  <Location />                                                                                                                                                                                                                                   
    Order allow,deny                                                                                                                                                                                                                             
    allow from all                                                                                                                                                                                                                             
  </Location>                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
 </VirtualHost> 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
 <VirtualHost *:80>                                                                                                                                                                                                                                   
  ServerName test.my-site.com                                                                                                                                                                                                               
  DocumentRoot "/var/www/test"                                                                                                                                                                                                                                                                                                                                                                                                                                                             
  ProxyPass "/" "http://127.0.0.1:8081/"                                                                                                                                                                                                       
  ProxyPassReverse "/" "http://127.0.0.1:8081/"                                                                                                                                                                                                                                                                                                                                                                                                                                             
  <Location />                                                                                                                                                                                                                                   
    Order allow,deny                                                                                                                                                                                                                             
    allow from all                                                                                                                                                                                                                             
  </Location>                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
 </VirtualHost> 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 #host                                                                                                                                                                                                                                        
 <VirtualHost *:80>                                                                                                                                                                                                                                   
  ServerAdmin myemail@email                                                                                                                                                                                                  
  ServerName www.my-site.com                                                                                                                                                                                                                
  ServerAlias my-site.com                                                                                                                                                                                                                   
  DocumentRoot /var/www/my-site                                                                                                                                                                                                             
  <Directory />                                                                                                                                                                                                                                        
    Options FollowSymLinks                                                                                                                                                                                                                       
    AllowOverride None                                                                                                                                                                                                                   
  </Directory>                                                                                                                                                                                                                                 
  <Directory /var/www/my-site>                                                                                                                                                                                                                      
    Options Indexes FollowSymLinks MultiViews                                                                                                                                                                                                    
    AllowOverride All                                                                                                                                                                                                                            
    Order allow,deny                                                                                                                                                                                                                             
    allow from all                                                                                                                                                                                                                       
 </Directory>                                                                                                                                                                                                                         
 </VirtualHost>        

Just to reiterate/clarify, I have flipped the mail and test subdomains (and their corresponding conf files) and test will still work bringing up the mail server but mail will not load the test page (basic apache index.html).

This is the conf file for test subdomain. mail is pretty much a mirror with the changed port and doc route and serverName until I find out why it will not load

 <VirtualHost *:8081>                                                                                                                                                                                                                                                                                                                                                                                                      
  ServerName test.my-site.com                                                                                                                                                                                                                                                                                                                                                                                                                                                            
  ServerAdmin myemail@email                                                                                                                                                                                                              
  DocumentRoot "/var/www/test"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
  ErrorLog ${APACHE_LOG_DIR}/error.log                                                                                                                                                                                                         
  CustomLog ${APACHE_LOG_DIR}/access.log combined                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
  <Directory /var/www/test>                                                                                                                                                                                                                           
    Order allow,deny                                                                                                                                                                                                                             
    allow from all                                                                                                                                                                                                                       
  </Directory>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
 </VirtualHost>  
     
vidarlo avatar
ar flag
Your config *can't* be what you posted. Please provide *actual* configuration. And tell us *what* gives you the error message. Browser?
do flag
It is my configuration. I know its showing up weird with some of the codeblock being wayyyyyyyyyy over to the right but backspacing and such wasn't working to have it format correctly. The web browseres (chrome, firefox, and opera) are giving the error. Thank you
do flag
Needed a space in front of each line, my bad. should be formatted correctly now
vidarlo avatar
ar flag
Ok. Tell us the actual domains involved so we can verify.
cn flag
Bob
Just a random thought HSTS and permanent redirects are cached. When previously you were using domain with https your browser will continue to automatically go to the https URL but you only have plain http configured so there won’t be anything responding there
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.