Site Statistics

Members : 1
Content : 47
Web Links : 14
Content View Hits : 39072

Apache VirtualHost - How to Create PDF Print E-mail

 

Create a virtual host you should have Apache installed on you server and I assume you have Apache installed and running. Simply follow the following steps to create the VH. 

Linux Users

  1. "cd /etc/apache2/sites-available"
  2. "vim <yourdomain>.conf "(make sure to do this as super user) 
  3. Type the following in the configuration file. (check <yourdomain>.conf bellow)
  4. Save and exit.
  5. "vim /etc/hosts" as super user and add following line.
  6. Type "a2ensite <yourdomain>.conf"  as super user to enable the VH.
  7. Reload Apache configuration using "/etc/init.d/apache2 reload" as super user.


<yourdomain>.conf

<VirtualHost *:80>
    ServerAdmin <server admin email>
    DocumentRoot /var/www/<folder name>
    ServerName <yourdomain> 
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

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

    ErrorLog /var/log/apache2/error.log
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/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
    </Directory>

</VirtualHost>  

hosts

 
127.0.0.1    localhost
127.0.0.1 localhost <yourdomain>

Trackback(0)
Comments (0)add comment

Write comment
Smaller | Bigger
 

busy
 

Get Firefox

Spread Firefox Affiliate Button