Apache Virtual Hosting
Apache dynamic virtual hosts?
im running a localhost server. i want to create a dynamic virtual hosts.
http://dude/ -> /home/dude/public_html
http://bro/ -> /home/bro/public_html
...and so on.
I follow exactly in apache help but no avail. The server stop with syntax error on my conf with point to VirtualDocumentRoot line. please how do i really do this..pointing the url to /home/*/public_html.
Thanks
im running a localhost server. i want to create a dynamic virtual hosts.
http://dude/ -> /home/dude/public_html
http://bro/ -> /home/bro/public_html
...and so on.
I follow exactly in apache help but no avail. The server stop with syntax error on my conf with point to VirtualDocumentRoot line. please how do i really do this..pointing the url to /home/*/public_html.
[code]
UseCanonicalName off
Nameserver 192.168.0.99:80
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
You HAVE to set the names in the virtual entries.
Setup WAMP Apache to use virtual hosts instead of aliases? (also mod_rewrite)?
I want to emulate my web hosting account locally for development and testing, using WAMPSERVER 2.0 under Windows..
So I can add an entry in the .hosts, eg. "local.mydomain.com" pointing at "127.0.0.1", no problem there, but how do I get Apache configured to use the virtual host name? I have no problem setting up folder aliases, eg. localhost/mydomain, I just don't know how to map the virtual host name to a directory like you would do in an alias.
Next issue is enabling url rewriting. I uncommented the line "LoadModule rewrite_module modules/mod_rewrite.so" in httpd.conf but this doesn't seem to be enough.. I am using Drupal 6.6 but it is detecting that rewrite is not enabled, possibly this is because it is running from an alias folder..
Quick 10 points for first correct answer, I don't need a long detailed write up on Apache config. Thanks. :-)
You need to use NameVirtualHost and set up VirtualHost configuration in your httpd.conf or an included file for each domain. you will also require the machine to see a dns set to this for it to truly work correctly.
what seems to be wrong with my apache hosts file... I want to host it on 127.0.0.1 and I can't get it up?
# Virtual Hosts
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
#
Try using localhost instead of the loopback IP#. If you use port forwarding on your router, you can forward any web server traffic to your machine that hosts the server. Just reserve/assign an IP number to your machine so DHCP doesn't do it. That way you can access your server externally from the net using your IP# from the ISP, or access it internally by using http://localhost or http://192.168.1.2 (or whatever IP# your assign your server machine).
Error 500, virtual hosts not taking effect?
What could be causing this problem? It says error 500 and inside my logs, it says the following:
[Sat Feb 02 04:27:00 2008] [error] [client 195.242.210.21] File does not exist: /var/www/apache2-default/joomla15
[Sat Feb 02 04:27:00 2008] [error] [client 195.242.210.21] File does not exist: /var/www/apache2-default/cms
[Sat Feb 02 21:38:23 2008] [error] [client 78.129.138.101] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw$
It seems my virtual hosts are not taking effect. How could the host name not be sent? These files not found are files that belong to document roots on the virtual hosts. The ones apache is looking for is in the main doc root.
The entry which says "request without hostname" is obviously caused by a bot (or PCs infected by virus) - i.e. an evil program that dumbly scans IP address ranges trying to exploit known vulnerabilities in web servers (mostly Microsoft ones). Don't worry about that - its is normal "background noise".
As far as "File does not exist" errors go, it is up to you to know what exactly is causing that - most likely misconfiguration or incorrect links on your site.
How do sites like blogger store virtual hosts?
I know that you can have virtual hosts in app servers like tomcat and apache. Most of the solutions I know of require you to list the vhosts in a text file which, I understand, requires tomcat/apache to be restarted. So my questions are two:
- Is there any way to store this information in a database? I've seen an apache module somebody wrote, but a large-scale solution would require that information to be cached because it changes so seldom.
- If it is stored in text files (perhaps automatically copied there from database contents), do all the servers have to be restarted? And doesn't that take a long time, during which the servers are unavailable? I cannot see a system like blogger.com having its servers being constantly taken down and back up.
I can't speak for how blogger does it specifically, but the simplest way is by a table of redirects. For example, if somebody accesses 'index.html' from 'foobar.com', you can simply map that to 'foobar.com/index.html' in your file system. That will 'just work' if you create a symbolic link named 'foobar.com' that points to the root of the site for that domain.
This means that you can add, remove, or change domains simply by adjusting the symbolic links. No server restart or any other change is needed. The caching is done by the file system.
My bet though is that sites like blogger build all of their sites out of a database and don't have any actual files per site other than the database. So if you go to a particular site, that site name just becomes part of the query that goes from the web server to the back end logic. The back end logic isn't going to be a web server at all.
Apache any good for ASP.NET?
Im looking for a web server that is capable of running ASP.NET v1.1 and 2.0 web apps. On my Win XP 64-bit box i only have a scaled back IIS6. Im really after virtual hosting so that i can host multiple web sites from the server instead of this virtual directory nonsense.
So far im eyeing Abyss X2 Pro v2.3+, the only working commercial solution i could find, but would like to find a free solution if possible. I've heard of Apache's ability to run ASP.NET. Can you tell me is Apache as effective at serving up ASP.NET 1.1/2.0 web apps as IIS6?
I still need to be able to debug my web apps.
Thanks
you will need some plugins along with it
use iis... its good for asp.net
and the configurations on apache can become really weird if you mess up something...
Setting up multiple websites on Apache?
I'm trying to set up multiple websites with Apache.
I have mapped my ip to joebloggs.dyndns.org and bloggsjoe.dyndns.org.
Both these url's work when I have just the one website.
However, when I put the following virtual hosts into the httpd.conf file, I get a '403: forbidden' error when trying to view the web page. The paths are the same document_root location as specified in httpd.conf, and as I say, everything was accessible before I added the virtual hosts.
Any ideas? Thanks.
--------------------------------------
NameVirtualHost *:80
Maybe you should try and remove www. from the last part:
ServerName www.joebloggs.dyndns.org
ServerName www.bloggsjoe.dyndns.org
It maybe not be setup to translate www.
Dillema with Apache?
Hi,
I am trying to set up apache properly on my computer. I am a web developer and want to use it for testing purposes. The problem that I am having is that I have more than one website. The way I have it set up is that each website is in it's own folder in the apache web directory. When I want to go to the website I would put in, for instance, localhost:8080/mywebsite. The problem that I am having is that all relative links in the website don't map to the 'mywebsite' directory. For instance links that go to pages/index.php go to localhost:8080/pages/index.php when they should go to localhost:8080/mywebsite/pages/index.php. I am fairly new to apache and am not sure how to solve this but I thought that maybe virtual hosts would work; however, I didn't really know how to set that up properly. Ideally I would like to go to mywebsite.localhost:8080. I do not know how to set up DNS but I am on a windows platform and do know how to edit this hosts file.
Thank you for your help,
Ryan
try typing in http://localhost/yourwebsitedirectory
Note: yourwebsitedirectory should be the name of the directory you created for the website






















