Skip to main content

Thread: Trouble adding subdomains to apache server


hi has beeing giving trouble few months now, been trying find solution via "google" route , i'm here.

have single lamp server running ubuntu server.
has 2 fqdn work fine via a2ensite etc. i've been wanting set subdomain on 1 of them no avail.

first major issue if try navigate git.site1.com can't access page (no ping). if connection might able figure out there. know can worked around putting directory within working hosts a) don't want , b) want know how future.

help's appreciated.

here's http.conf
code:
  1 namevirtualhost *    2 <virtualhost *>    3         servername www.site1.com    4         serveralias site1.com *.stie1.com    5         documentroot /var/www/site1.com    6 </virtualhost>    7     8 <virtualhost *>    9         servername www.site2.com   10         serveralias site2.com *.site2.com   11         documentroot /var/www/site2.com   12 </virtualhost>   13    14 <virtualhost *>   15         servername git.site1.com   16    17         <location /repo.git>   18                 dav on   19                 authtype basic   20                 authname "git repository"   21                 authuserfile /etc/apache2/passwd.git   22                 require valid-user   23         </location>   24 </virtualhost>
and apache2 site file sites-available:
code:
  1 <virtualhost *>    2         serveradmin admin@site1.com    3         servername git.site1.com    4     5         documentroot /var/www/git    6         <directory />    7                 options followsymlinks    8                 allowoverride none    9         </directory>   10         <directory /var/www/git>   11                 options indexes followsymlinks multiviews   12                 allowoverride   13                 order allow,deny   14                 allow   15         </directory>   16    17         scriptalias /cgi-bin/ /var/www/cgi-bin/   18    19         loglevel warn   20    21         serversignature off   22    23     alias /doc/ "/usr/share/doc/"   24     <directory "/usr/share/doc/">   25         options indexes multiviews followsymlinks   26         allowoverride none   27         order deny,allow   28         deny   29         allow 127.0.0.0/255.0.0.0 ::1/128   30     </directory>   31    32 </virtualhost>

i wrote article on site on setting apache, go in forum, lazy direct link.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [SOLVED] Trouble adding subdomains to apache server


Ubuntu

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support