SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with virtual servers

    Hey guys, can you guys take a look at my script? I put my virtual server in the hosts files in windows, but i cannot access the documents or anything for that matter with the webpage, i always get files doesnt exist..



    I want to be able to add more sites on easily down the road.
    Attached Files Attached Files

  2. #2
    Non-Member
    Join Date
    Jan 2004
    Location
    Seattle
    Posts
    4,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Joey2619
    Hey guys, can you guys take a look at my script? I put my virtual server in the hosts files in windows, but i cannot access the documents or anything for that matter with the webpage, i always get files doesnt exist..

    I want to be able to add more sites on easily down the road.
    #<VirtualHost *>
    # ServerAdmin webmaster@dummy-host.example.com
    # DocumentRoot /www/docs/dummy-host.example.com
    # ServerName dummy-host.example.com
    # ErrorLog logs/dummy-host.example.com-error_log
    # CustomLog logs/dummy-host.example.com-access_log common
    #</VirtualHost>

    Here's how mine is set up:

    NameVirtualHost *:80

    <VirtualHost *:80>
    ServerName localhost
    DocumentRoot /apachefriends/xampp/htdocs
    </VirtualHost>

    <VirtualHost *:80>
    ServerName geobop
    ServerAlias geobop *.geobop
    DocumentRoot c:\sites\geobop
    </VirtualHost>

    <VirtualHost *:80>
    ServerName geozoo
    ServerAlias geozoo *.geozoo
    DocumentRoot c:\sites\geozoo\public_html
    </VirtualHost>

    * * * * * * * * * *

    I've been told that I should replace * with 127.0.0.1, but it doesn't work when I do that. I've also been advised to add error handlers, but those kill the script, too.

    Notice that I added public_html to DocumentRoot on the last site. It works as long as your site is actually inside a folder named public_html and you make a note of that when you set up your Dreamweaver site notifications.

    I've been told that my strategy is a security risk, but I can't modify it without killing the script, and I've been unable to get any help on several different forums. I haven't even been able to find out if placing websites in public_html folders locally is a common/recommended practice or not.

  3. #3
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    does itl ook like im doing anything wrong >

  4. #4
    Non-Member
    Join Date
    Jan 2004
    Location
    Seattle
    Posts
    4,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Joey2619
    does itl ook like im doing anything wrong >
    I don't know enough about it. Make a backup copy of your file, then change your script, using mine as a guide, and see if it works. Then choose whichever works best for you.

  5. #5
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok well people outside of my network can view the site now, no problem. But howcome I cannot view the site internally with 127.0.0.1, OR using the url that people outside the network use to look at the site...and how do i add more sites to this? with each having its own unique way ?

  6. #6
    Non-Member
    Join Date
    Jan 2004
    Location
    Seattle
    Posts
    4,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Joey2619
    Ok well people outside of my network can view the site now, no problem. But howcome I cannot view the site internally with 127.0.0.1, OR using the url that people outside the network use to look at the site...
    I don't know.

    and how do i add more sites to this? with each having its own unique way ?
    Here's how I added two more sites named "geoworld" and "politix":

    <VirtualHost *:80>
    ServerName geozoo
    ServerAlias geoworld *.geoworld
    DocumentRoot c:\sites\geoworld\
    </VirtualHost>

    <VirtualHost *:80>
    ServerName politx
    ServerAlias politix *.politix
    DocumentRoot c:\sites\politix\
    </VirtualHost>

  7. #7
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how do i point a redirection service to each site ? like say...


    www.sitea.no-ip.com directed to port 811
    www.siteb.no-ip.com directed to port 811



    how do i make each site have its own directory and not interferre with the others, like no crossovers or anything ?

  8. #8
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well whatever, i found the answer to that. Sorta.

    Anyways, Geosite, all of your webpages, they hosted off of one apache server right? Can you do me a HUGE favor, and email me your whole http.conf without editing anything so maybe i can get ALOT of pointers from your setup? if you can, my email is John2619@optonline.net

    It would help me alot if you could assume this favor.

    Thanks




    EDIT: Also, is there anyway to bind a virtual server to its own port and directory? So site A which I want on port 811, doesnt access the directory i assigned to port 812, and visa-versa. Reason for that is cause i want to isolate each site.
    Last edited by Joey2619; Feb 19, 2005 at 08:22.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •