LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   linux web server configuration (https://www.linuxquestions.org/questions/linux-newbie-8/linux-web-server-configuration-4175431347/)

rasel89 10-09-2012 10:43 AM

linux web server configuration
 
When i am tried to configure web server then [warn] NameVirtualHost 127.0.0.1:80 has no VirtualHosts
message appear.

What is the problem???

Please Help

Basher52 10-09-2012 10:50 AM

Take a check on these:
http://httpd.apache.org/docs/2.2/vhosts/examples.html
http://www.mydigitallife.info/apache...or-when-start/
http://mightydreams.blogspot.se/2011...ns-in-lan.html
http://www.linuxquestions.org/questi...ut-dns-806892/
http://apache-http-server.18135.n6.n...td4723973.html

thesullster 10-09-2012 12:20 PM

You have to create virtual sites first. For Debian:

Code:

sudo nano /etc/apache2/sites-available/<domain name eg google.com>
Copy and paste this text inside nano:
Code:

                <VirtualHost *:80>
                ServerAdmin <admin email address>
                ServerName  <domain name eg google.com>
                ServerAlias <domain alias eg www.google.com>

                DirectoryIndex index.html index.php
                DocumentRoot /home/<your folder for this site eg google.com>

                LogLevel warn
                ErrorLog  /home/<your folder>/log/error.log
                CustomLog /home/<your folder>/log/access.log combined
                </VirtualHost>

Copy and paste this text again using domain name for all your other sites/domains you want apache to serve.

Exit and save the file.

Enable virtual sites:
Code:

sudo a2ensite <your folder>
Reload apache:
Code:

sudo /etc/init.d/apache2 reload


All times are GMT -5. The time now is 03:42 AM.