I'm trying to configure name-based virtual hosting, and I'm SO close, but I've got a question...
First off, here is the relevant info from httpd.conf
Code:
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
# 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>
<VirtualHost *:80>
DocumentRoot /home/thatscri/public_html
ServerName thatscriptguy.com
<Directory "/home/thatscri/public_html">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /home/thatscri/public_html
ServerName www.thatscriptguy.com
<Directory "/home/thatscri/public_html">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/home/billiards/public_html"
ServerName www.billiardstalk.com
<Directory "/home/billiards/public_html">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/home/billiards/public_html"
ServerName billiardstalk.com
<Directory "/home/billiards/public_html">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
1. Does that look alright? Is there anything in there that should be changed up any?
2. The only way that I could get the websites to work with www and without www was to add two virtualhosts for each site. Is there a way around this?
Virtualhosts have got me stuck, I was wondering if someone could help me out.
It seems as though no matter what I try, even though I've read over 3 tutorials I can't get virtualhosts working properly.
Basically I have the
documentroot set to /var/www/html/
I'd like to create a virtualhost (I guess name based?) which has a document root of
/var/www/userdata/
Something like this is what I'm trying to accomplish:
Code: <VirtualHost data.jcink.com:80> ServerAdmin bleh@bleh.net DocumentRoot /var/www/html/userdata ServerName data.jcink.com </VirtualHost> So when someone goes to data.jcink.com it loads up /userdata/. And have all the other subdomains on my site continue to stay where they are.
But every time I try to do anything like that, it doesnt work. All I'm looking for is the proper code to put in the config to get it done, and if that's possible...
I'm trying to configure my ftp server (lateste proftpd) and I am stucked on virtualhosts.
I'd like to have two different domains have each their own anonymous access, but I only have one IP on my server.
As you might know, ftp does not handle the HOST field in its header as the HTTP protocol does... so I just can't seem to get it work out... I tried adding an alias IP to my main interface, it works great of course but only when I connect from my server to my server...
Currently working on debian ETCH with latest bind, mysql, proftpd and apache2
I am really having trouble getting a virtualhost to work for an SSL certificate.. my browser just will not load the page..I have tried several different articles on how to setup a virtualhost and none of them seem to work.
My ssl.conf [URL] .....
*Note: I did purchase an SSL certificate - it is not self signed.
I've a problem with my Plesk 12.0.18 Panel ,I tried to login today with Admin_User for a virtual host ,but there was a problem with logging "Error: You have entered incorrect username or password."then I used the User Administrator ,and I found "No web hosting" Under the Domain Name for the workspace !!!and the icons disappeared there are only
-DNS Settings -Mail Settings -ODBC Data Sources -Remove Website
Running Apache 2.2.22 on Ubuntu 12.04...Here's (in addition to default) my papertower config in sites-available: URL....
When I restart, I get this message: [URL] ....
I'm coming from Apache on Windows and trying to set up the same workflow I had there. Basically, if I placed a folder in /www/papertower/ it would become accessible via directoryname.papertower.dev after adding the host.
I'm having a strange issue getting it going again. Oddly, when I didn't have the wordpress config set up properly and went to site.papertower.dev, it would give me the "failed to connect to database" message. This made me happy, as it meant it was pointing at the right folder. Once I fixed the database config file, however, and go to site.papertower.dev, it thinks for a moment, then goes to www.site.papertower.dev and gives me a "Oops! Google Chrome could not find www.site.papertower.dev".
I double-checked that all the appropriate mods were enabled (especially rewrite), but that hasn't made a difference.
I have vhost setup for test of a new website. I want to allow access on the localhost, and, from one IP from the Internet (redacted). Apache serves the site just fine on the server but I can't access the site from my the "xxx...." IP.
I'm using a physical path to test from the public IP as follows:
I have vhost setup for test of a new website. I want to allow access on the localhost, and, from one IP from the Internet (redacted). Apache serves the site just fine on the server but I can't access the site from my the "xxx...." IP.
I'm using a physical path to test from the public IP as follows:
Code: <VirtualHost *:80> ServerName test ServerAlias test DocumentRoot /home/user/public_html/test <IfModule mod_fcgid.c>
[Code] .....
I don't have a FQDN as yet, so I just made a entry in /etc/hosts as follows:
Code: 127.0.0.1 test
Here is an excerpt from the Apache error log:
Quote: [Mon Jun 17 12:02:16 2013] [error] [client xxx.xxx.xxx.xxx] client denied by server configuration: /home/user/public_html/test/index.html
I've checked the firewall and the /etc/hosts.allow- that's not it. I've read the Apache docs and in the vhost block Allow should be evaluated last, and apparently is matching localhost but is not matching my IP.