Apache2 vhosts

Kezdőlap Fórumok Vegyes felvágott Apache2 vhosts

1 / 1 bejegyzés megtekintése
  • Szerző
    Bejegyzés
  • #1877614
    aty
    Felhasználó

      Adott egy szerverke dinamikus ipvel. Dyn.hus hostok vannak hozzárendelve. Ezek a dyn.hu hostok apache1 alatt vhostként mûködtek. http://aty.tx.hu = http://medvesajt.tx.hu/~aty ; http://ranger.tx.hu = http://medvesajt.tx.hu/~ranger. Tökéletesen mentek is.
      Váltottam apache2-re. Itt ugyebár a httpd.conf elég rendesen szét lett darabolva. Létezik sites-avaliable könyvtár, ide raktam a vhost confjait. Illetve egy sites-enabled, ide raktam symlinkeket a confokra.
      A vhostok közül azonban mindig csak az egyik mûködik. Tehát medvesajt.tx.hura és ranger.tx.hura is az aty.tx.hunál meghatározott elérési út jön be.
      Itt vannak a config fájljaim:

      medvesajt:/etc/apache2/sites-enabled# ls -las
      összesen 8
      4 drwxr-xr-x  2 root root 4096 2004-12-19 17:53 .
      4 drwxr-xr-x  8 root root 4096 2004-12-19 17:31 ..
      0 lrwxr-xr-x  1 root root  22 2004-12-19 17:34 aty -> ../sites-available/aty
      0 lrwxr-xr-x  1 root root  36 2004-12-19 17:30 default -> /etc/apache2/sites-available/default
      0 lrwxr-xr-x  1 root root  25 2004-12-19 17:46 ranger -> ../sites-available/ranger

      medvesajt:/etc/apache2/sites-enabled# cat aty
      NameVirtualHost *:80

          ServerAdmin root@medvesajt.tx.hu
          DocumentRoot /home/aty/public_html
          ServerName aty.tx.hu
          CustomLog /var/log/apache2/aty.log combined

      medvesajt:/etc/apache2/sites-enabled# cat default
      NameVirtualHost *:80

              ServerAdmin webmaster@localhost
              DocumentRoot /var/www/
             
                      Options FollowSymLinks
                      AllowOverride None
             
             
                      Options Indexes FollowSymLinks MultiViews
                      AllowOverride None
                      Order allow,deny
                      allow from all
                      # This directive allows us to have apache2’s default start page
                      # in /apache2-default/, but still have / go to the right place
                      RedirectMatch ^/$ /apache2-default/
             

              ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
             
                      AllowOverride None
                      Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                      Order allow,deny
                      Allow from all
             

              ErrorLog /var/log/apache2/error.log

              # Possible values include: debug, info, notice, warn, error, crit,
              # alert, emerg.
              LogLevel warn

              CustomLog /var/log/apache2/access.log combined
              ServerSignature On

              Alias /icons/ „/usr/share/apache2/icons/”
             
                  Options Indexes MultiViews
                  AllowOverride None
                  Order allow,deny
                  Allow from all
             

          Alias /doc/ „/usr/share/doc/”
         
              Options Indexes MultiViews FollowSymLinks
              AllowOverride None
              Order deny,allow
              Deny from all
              Allow from 127.0.0.0/255.0.0.0 ::1/128
         

      medvesajt:/etc/apache2/sites-enabled# cat ranger
      NameVirtualHost *:80

          ServerAdmin root@medvesajt.tx.hu
          DocumentRoot /home/ranger/public_html
          ServerName ranger.tx.hu
          CustomLog /var/log/apache2/ranger.log combined

    1 / 1 bejegyzés megtekintése
    • Be kell jelentkezni a hozzászóláshoz.