+ Reply to Thread
Results 1 to 2 of 2

Thread: Apache

  1. #1
    stpvoice's Avatar
    stpvoice is offline Community Support Rep stpvoice has a brilliant futurestpvoice has a brilliant futurestpvoice has a brilliant future
    Join Date
    Dec 2008
    Location
    United Kingdom
    Posts
    5,890

    Arrow Apache

    Anyone know how to set an apache installation to listen for subdomains, as well as the root domain??

    Any help would be appreaciated.


  2. #2
    vishal's Avatar
    vishal is offline -::-X10 Guru-::- vishal has a brilliant futurevishal has a brilliant future
    Join Date
    Nov 2009
    Location
    INDIA
    Posts
    5,250

    Re: Apache

    For this u have to edit /etc/http/conf/httpd.conf

    Then here is eg how to do it
    a. enable name virtual hosting on the ip
    NameVirtualHost 192.100.0.X
    b. First site: stationx.example.com
    <VirtualHost stationx.example.com >
    ServerName stationx.example.com
    DocumentRoot /var/www/abc/
    DirectoryIndex index.html
    ServerAdmin root@ stationx.example.com
    ErrorLog logs/error_abc.logs
    CustomLog logs/custom_abc.logs common
    </VirtualHost>
    c. Second site: wwwx.example.com
    <VirtualHost wwwx.example.com>
    ServerName wwwx.example.com
    DocumentRoot /var/www/example/
    DirectoryIndex index.html
    ServerAdmin root@stationx.example.com
    ErrorLog logs/error_example.logs
    CustomLog logs/custom_example.logs common
    </VirtualHost>
    2. service httpd start| restart
    3. chkconfig httpd on
    4. links wwwx.example.com
    6. links stationx.example.com
    For Name based Virtual Hosting, we should specified the IP address on which we
    are going to host the multiple sites using NameVirtualHost options.
    • ServerName means you FQDN, already lookup on DNS
    • DirectoryRoot path for web documents for this site.
    • DirectoryIndex default page for websites.
    Regards ~ Vishal
    Giving Reputation (at bottom of my post ) is the best way to encourage the person who helped you on forums.

+ Reply to Thread

Similar Threads

  1. Replies: 0
    Last Post: 01-15-2009, 10:41 AM
  2. Great Success ! - Apache Index Page...
    By naugul in forum Soporte
    Replies: 3
    Last Post: 05-31-2008, 12:00 PM
  3. configuring php on localhost
    By ufclan in forum Scripts & 3rd Party Apps
    Replies: 15
    Last Post: 01-22-2008, 09:34 AM
  4. installing Apache in Localhost.
    By naim4u in forum Tutorials
    Replies: 5
    Last Post: 01-20-2008, 05:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers