1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Managing multiple sites locally

Discussion in 'Site & Server Administration' started by Aragorn, Mar 25, 2007.

  1. #1
    I run a local server on my pc for managing and testing my websites. But presently I have 3 websites, so now I've to access them like
    * http://localhost/mydomain1/
    * http://localhost/mydomain2/
    * http://localhost/mydomain3/

    Is there some software that allows me to install my different sites on different ports so that I can access my different sites with different ports like

    * http://localhost:1/
    * http://localhost:2/
    * http://localhost:3/

    Also is it possible to access my site like
    * http://mysite1/
    * http://mysite2/
    * http://mysite3/
    (See the missing extension)

    Any help will be much appreciated. Thanks for looking at the thread.
     
    Aragorn, Mar 25, 2007 IP
  2. Your Content

    Your Content Banned

    Messages:
    1,096
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I use Xampp that runs as localhost on port 80 www.apachefriends.org

    Then I installed Abbys Webserver on port 8000 www.aprelium.com

    This way typing http://localhost:80, I get Xammp directory
    and typing http://localhost:8000, I get Abbys directory

    Occassionally I need a thrid server that installs itself in port 8080, www.badblue.com, though this is for file sharing

    The trick for automatic port assignment is keep running your default server while installing the second and third, although you can assign ports manually through their consoles.

    NOTE, you can also install Microsoft IIS as your third server that way ;)
     
    Your Content, Mar 25, 2007 IP
    Aragorn likes this.
  3. Aragorn

    Aragorn Peon

    Messages:
    1,491
    Likes Received:
    72
    Best Answers:
    1
    Trophy Points:
    0
    #3
    Is it necessary that I should install 3 webservers? Can I do it with one server? I mean like how the share hosting servers do it.
     
    Aragorn, Mar 25, 2007 IP
  4. Your Content

    Your Content Banned

    Messages:
    1,096
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I have 3 different servers running due to different scripting/services provided but you can install a single one and either aliasing your directories or creating virtual hosts, just edit your httpd.conf file.

    For this purpose Xampp is your best option, in example

    
    <VirtualHost *:80>
        ServerAdmin webmaster@mydomain1
        DocumentRoot /htdocs/mydomain1
        ServerName mydomain1
        ErrorLog logs/mydomain1
    </VirtualHost>
    
    <VirtualHost *:8000>
        ServerAdmin webmaster@mydomain2
        DocumentRoot /htdocs/mydomain2
        ServerName mydomain2
        ErrorLog logs/mydomain2
    </VirtualHost>
    
    etc. etc.
    
    Code (markup):
     
    Your Content, Mar 25, 2007 IP
  5. Aragorn

    Aragorn Peon

    Messages:
    1,491
    Likes Received:
    72
    Best Answers:
    1
    Trophy Points:
    0
    #5
    Thanks a lot, I've started downloading Xampp. But, can I do the same with my current installation of Apache?
     
    Aragorn, Mar 25, 2007 IP
  6. Your Content

    Your Content Banned

    Messages:
    1,096
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Your Content, Mar 25, 2007 IP
  7. Aragorn

    Aragorn Peon

    Messages:
    1,491
    Likes Received:
    72
    Best Answers:
    1
    Trophy Points:
    0
    #7
    Thanks again. I'll do as you adviced. :)
     
    Aragorn, Mar 25, 2007 IP
  8. Aragorn

    Aragorn Peon

    Messages:
    1,491
    Likes Received:
    72
    Best Answers:
    1
    Trophy Points:
    0
    #8
    Aragorn, Mar 25, 2007 IP
  9. Your Content

    Your Content Banned

    Messages:
    1,096
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Glad to hear you got your sites working and really helpful and easy reference to jot down :)
     
    Your Content, Mar 26, 2007 IP
  10. designcode

    designcode Well-Known Member

    Messages:
    738
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    118
    #10
    Make as much virtual host as your sites. Don't forget to add a host entry in your host file.
     
    designcode, Mar 26, 2007 IP
    d16man likes this.