Apache :: VirtualHost - Configure Subdomains?
Jan 14, 2013
I have substituted the domain names and DocumentRoot folders for generic titles, so I will refer to those where applicable in the thread as well.
Here is my httpd-vhosts.conf:
<VirtualHost *:80>
DocumentRoot "C:WebServerwww"
</VirtualHost>
<VirtualHost *:80>
[Code] ....
View 1 Replies
ADVERTISEMENT
Dec 10, 2013
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.
View 13 Replies
View Related
Oct 8, 2013
What is the proper syntax to perform a redirect within the <VirtualHost:443> section of the httpd.conf file?
The issue is: I have an existing login URL path that has changed slightly. As an example, let's say the old URL is:
"https://www.something.net/item1/item2/login.jsp" but now there's a "new" name for 'item2'.
I only want a user to be automatically redirected to the "new" path, but is ONLY triggered when the "old" login URL path is entered and nothing else.
View 2 Replies
View Related
Feb 9, 2014
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.
View 4 Replies
View Related
Jun 17, 2013
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:
xxx.xxx.xxx.xxx/~user/test/index.html
View 3 Replies
View Related
Jun 17, 2013
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:
Quote:
http://xxx.xxx.xxx.xxx/~user/test/index.html
Apache v2.2
RHEL6
UserDir configured/running
SuExec configured/running
Below is the relevant vhost block in httpd.conf:
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.
View 5 Replies
View Related
Oct 11, 2012
Does the apache virtualhost environment lower the web or apache server's security? virtualhost has no security issues.
View 3 Replies
View Related
Apr 22, 2013
trying to find a working solution for setting up a subdomain for my Apache server.
Here is my setting:
(1) I have two virtual hosts defined in httpd-vhosts.conf: domain1.com and domain2.com. Included NameVirtualHost *:80 both into httpd-vhosts.conf and httpd.conf.
(2) Settings in httpd-vhosts.conf:
Quote:
# domain1.com virtual host.
ServerAdmin info@domain1.com
DocumentRoot "d:/Websites/domain1_com/www"
ServerName domain1.com:80
ServerAlias *.domain1.com
[Code] ....
So far, everything works perfectly.
(3) Now, I added a virtual host for subdomain:
Quote:
# sub.domain2.com virtual host.
ServerAdmin info@sub.domain2.com
DocumentRoot "d:/Websites/sub_domain2_com/www"
ServerName sub.domain2.com:80
[Code] ...
4) Here the problem comes. When I enter sub.domain2.com into browser, it shows domain1.com content.
(5) Based on some suggestions, I removed asterisks from ServerAlias lines. This made the subdomain working, but messed up the other two servers, which became unavailable or broken down.
View 8 Replies
View Related
Oct 12, 2013
When I type mail.mydomain.com into any browser it resolves to the first virtual host that my apache has even though there aren't any document roots defined for mail.mydomain.com. Apache itself works fine, mail server itself works fine as well. I thought that since mail.mydomain.com has an A record but does not have any document roots specified for that Apache simply takes the first virtual host it has on its list and shows it up online as mail.my domain.com. Is that not right? Is there perhaps any misconfiguration somewhere?
I tried deleting virtual hosts one by one and this test simply confirmed that in order to "serve" mail.mydomain.com Apache takes the first virtual host it has on the list. Then I created a document root for mail.mydomain.com and now it shows some test content I specified but my issue / question remains.. Does it mean that I have to create document root stuff for every single A record I have? For example I have an A record for mail. mydomain. com which works as a mail server but for some reason it also resolves as a simple web page?
The problem in short is that when I type mail.mydomain.com into a browser it shows the content from subdomain.mydomain.com. The relation to mail is not webmail, it's just a regular standard mail server. The question / goal is to find out whether it is supposed to be like that? If it is then I will have to create some content to be shown when someone types mail.mydomain.com
View 14 Replies
View Related
Feb 10, 2014
I'm using the following vhost script: URL...This used to work on an older version of apache in Windows. Now I'm running Apache 2.4.6 on Ubuntu 12.04.
When I type in, for example, dhae.papertower.dev, it processes some scripts internally and moves me to www.dhae.papertower.dev.. and breaks. When I check my log, I find that it's trying to go to the /var/www/papertower/www directory.
I tried adding www.*.papertower.dev to the ServerAlias, but that didn't do it.
View 1 Replies
View Related
Apr 27, 2006
I'm currently trying to configure apache 2 to handle subdomains. This is on a local machine (not tied to any domain names) and I'm only doing it to research how the final structure of a site 'could' be setup.
Basically I have a single install of Apache 2 running. The outcome eventually should be to have specific sub domains that all point to the same document root as the actual domain name. So eventually I will have:
http://www.mydomain.com
http://subdomain1.mydomain.com
http://subdomain2.mydomain.com
with both subdomains showing the content at mydomain.com (there is reasoning behind this but I'm not gonna go into that).
I have apache setup as follows:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName daneastley
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
</VirtualHost>
<VirtualHost *:80>
ServerName subdomain1.daneastley
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
</VirtualHost>
<VirtualHost *:80>
ServerName subdomain2.daneastley
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
</VirtualHost>
Now on my local machine, only the top one works - the subdomains dont. if I add the following into my hosts file in windows, they all work:
127.0.0.1 daneastley
127.0.0.1 subdomain1.daneastley
127.0.0.1 subdomain2.daneastley
the problem being, that I wish to test this enviroment on the local network. How would I go about having every computer being able to access this? I'm assuming it comes down to DNS stuff.
View 0 Replies
View Related
Jul 11, 2015
I have viewing the city names in my website like the following structure - [URL] ....
Here is the ,htaccess code - RewriteRule ^([^/]*)/([^/]*)/$ city.php?state=$1&city=$2 [NC]
But actually, I'm looking for to use wildcard subdomains that will rebuild the city names like the following structure-
city.mydomain.com/state/
I just need the htaccess rewrite code.Â
View 1 Replies
View Related
Jun 8, 2013
I want to rewrite across subdomains, e.g. requests for sub1.mydomain.com/foo.htm -> www.mydomain.com/foo.htm. I can do
this with something like:
Code:
RewriteCond %{HTTP_HOST} ^sub[0-9].
RewriteRule (.*) http://www.mydomain.com/$1 [R=303,L]
I want to make it an internal rewrite though, not an external redirect. If I remove the [R=303] I still end up with a redirect (a 302). I assume mod_rewrite is forcing an external redirect because it's to a different [sub]domain.
Is there any way I can overcome this and make the change internal?
View 2 Replies
View Related
Jan 21, 2015
Say I have two domains: example.com and example.net.
Upon a http request to example.com, I wish to redirect to https://example.com.
Upon either a http or https request to example.net, I wish to redirect to https://example.com.
Note that for both cases, subdomains should also be redirected, and the change should be considered permanent.
I've seem multiple ways to do so. What is the best way? How do I deal with subdomains when there is a new domain such as example.net to example.com?
I've taken a stab. How to fill in the gaps?
View 1 Replies
View Related
May 27, 2015
Since a week ago or so, in one of our Plesk 12.0.18 / Centos 6.6 servers, when we create subdomains the process seems to stop half-way without being finished.
To reproduce the error:
Select a subscription (e.g. example.com) and go to "Domains and subdomains"
Select "add new subdomain" and enter a value (e.g. new.example.com). The directory will live in parallel to httpdocs
Click Accept
Expected result:
The subdomain should be created: Filesystem diirectory with default contents, DNS entry, Apache VirtualHost, etc.
Actual result:
After several minutes Plesk responds with Internal Errror (in a red area in the panel).
Things done right:
The file space in parallels with httpdocs is created fine with the default site.
DNS entries are created under /var/named/chroot infrastructure.
The subdomain menu appears fine in the Plesk panel.
Things wrong/missing:
The filesystem directory is not mapped by Apache. Even after changing its contents the default server templeate appears in the browser, (all precautions taken, apache restart, browser in private session and different browsers).
Log info:
- /var/log/sw-cp-server/error_log says:
2015/05/27 18:17:45 [error] 28890#0: *1828 readv() failed (104: Connection reset by peer) while reading upstream, client: nnn.nnn.nnn.nnn, server: , request: "POST /smb/web/add-subdomain HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "<hostname>:8443", referrer: "https://<host>:8443/smb/web/add-subdomain"
- /var/log/httpd/access_log records the access with 200 OK codes although I don't find them in neither subscription logs under /var/www/vhost/system/*/logs/access_log
nnn.nnn.nnn.nnn - - [27/May/2015:18:38:35 +0200] "GET <deleted_content_in_the_subdomain_directory> HTTP/1.1" 200 14036 "http://<new_subdomain>" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0
I don't find the Apache VirtualHost .conf files for subdomains, where can I look for them up...
View 4 Replies
View Related
May 31, 2009
Where can I find how to configure apache for web hosting correctly?
View 7 Replies
View Related
Apr 26, 2008
I use linux server with Cpanel control panel.
default default apache logs folder is in /usr/local/apache/logs/error_log
I want to monitor errors . How can I have an error log file for each individual domain?
View 3 Replies
View Related
Aug 7, 2014
(I am using apache 2.2.25).I have this "HTML5 and CSS all in one for dummies" Book. And it tells me I have to configure the .conf file to make apache work with PHP.
At this point I have only edited the Document root folder. The book tells me to find a Loadmodule with an # with a mention of PHP (I'll put the text of the book at the end) and to add an "addtype" statement. If have found neither and when I add the manually the server doesnt work.how can I make PHP work? Also, I have noticed that the Apache commands in CMD don't work. I am running windows 8.1. URL....
View 1 Replies
View Related
Oct 11, 2013
I'm working on a script to automatically install apache. Now, after the apache configure/make/make install I need to test for a successful completion. I checked the configure options but there is no flag for an unsuccessful finish.I would like to know if there is any other way than to test the command output for a successful or unsuccessful ending? I'm saving the output on a file and then grepping for an expected line. For example "creating test/ Makefile" for the configure.
View 2 Replies
View Related
Aug 1, 2008
I just picked up a WiredTree VPS account, but have never really dabbled deep into server-related knowledge. I was wondering what one would do to rid of the "Great Success!
Apache is working on your cPanel® and WHM™ Server" pages when subdomains are accessed?
View 0 Replies
View Related
Mar 23, 2007
I've just downloaded Microsoft Virtual PC and the Internet Explorer 6 Application Compatibility VPC Image containing an XP installation for testing sites with IE6 [url].
Everything works fine, I chose VPC Shared Networking (NAT) and I can access the internet from the VPC as well as my Apache development server which runs on the host OS (Win XP) by going to the host's IP address which is [url] in my case. And here I have 2 problems:
1. I want to access [url]on VPC just by typing [url]. I added the following line to the hosts file:
192.168.52.141 localhost
But this doesn't work. Interestingly, any name other than localhost works fine, for example:
192.168.52.141 localhost.localhost
or
192.168.52.141 local
This is not a major problem but I'd prefer localhost. Any ideas how to do that?
2. And the more important issue: on my host OS I have some development sites which I have set up to be accessed by subdomains, for example [url], in httpd.conf:
Code:
<VirtualHost 127.0.0.3>
ServerName perfekt.localhost
DocumentRoot C:wwwperfekt
DirectoryIndex index.php index.html
</VirtualHost>
and in hosts file:
Code:
127.0.0.3 perfekt perfekt.localhost
And now I want to access this site from my VPC too by using subdomains like this! How can I do that? The address 127.0.0.3 seems to be local to the OS and VPC can't see it. I have tried setting other IP addesses in httpd.conf but nothing outside the 127.x.x.x range works on either OS. I suppose I need to make each of my sites to be seen under a different IP from the outside network so that VPC (which is "outside" the host OS) can access them - then I just set up the appropriate subdomain names in VPC hosts file -
View 0 Replies
View Related
May 31, 2014
I am trying to set up domains and subdomains, on my webserver, however the domains are resolving, but when accessing a subdomain I get a 500 internal server error, permissions on files are the same on both domain and sub domain level.
My virtual host files looks like this for domains and for the subdomains, and I am using Apache 2.4.7, on an ubuntu 14.04 running on a rackspace cloud server.
Domains:
<virtualhost *:80>
ServerAdmin mail@mail.mail
ServerName domain.com
ServerAlias www.domain.com
[Code] ....
Why it works on domains, and not the subdomains?
View 1 Replies
View Related
Oct 28, 2007
What are the ./configure parameters commonly used for Apache (2.2) and PHP (5.2) installations on web hosting servers?
View 5 Replies
View Related
May 2, 2013
I wanted to configure 2 clusters on Apache 2.4. Here are my sample configurations
Cluster 1 config:
----------------
<VirtualHost *:80>
ServerName mywebsite1.com
<IfModule mod_proxy_balancer.c>
<Proxy balancer://sgcluster>
BalancerMember http://IPaddress1:80/ loadfactor=1
BalancerMember http://IPaddress2:80/ loadfactor=2
ProxySet lbmethod=byrequests
[Code] ....
I've included both configuration file in httpd.conf. I'm getting the errors, when I tried to start up the apache.
[Thu May 02 11:01:34.243583 2013] [slotmem_shm:debug] [pid 9240606:tid 1] mod_slotmem_shm.c(448): AH02301: attach looking for /opt/apache2/logs/slo
tmem-shm-mod_heartmonitor.shm
[Thu May 02 11:01:34.243667 2013] [lbmethod_heartbeat:notice] [pid 9240606:tid 1] AH02282: No slotmem from mod_heartmonitor
[Code] .....
View 2 Replies
View Related
May 23, 2015
how to benchmark and configure FCGI.
View 4 Replies
View Related
Jun 18, 2013
I have a magento based ecommerce website. In have to integrate a payment method which requires a certificated delivered from a specific certification authority not recognized by browsers. Then I have to use 2 diffrent certificates, one for the payment and the other for the remaining secure operations. Is it configurable in apache?
View 6 Replies
View Related
May 7, 2007
I've set up the affiliate manager from jrox.com for a client of mine. This includes the setup of wildcard DNS so that each affiliate can have username.clientssite.com and have it count their clicks - which works properly.
What isn't working properly is that he also has forums.hissite.com, which is loading the main website page instead of his forums. He is using cpanel to add the subdomain, and it isn't failing, so I'm not sure what's going on with it.
Here is the relative section from the httpd file.
Quote:
<VirtualHost 74.53.106.146>
ServerAlias residualvictory.com
ServerAlias *.residualvictory.com
ServerAdmin webmaster@residualvictory.com
DocumentRoot /home/residual/public_html
BytesLog domlogs/residualvictory.com-bytes_log
ServerName www.residualvictory.com
User residual
Group residual
CustomLog /usr/local/apache/domlogs/residualvictory.com combined
ScriptAlias /cgi-bin/ /home/residual/public_html/cgi-bin/
</VirtualHost>
<VirtualHost 74.53.106.146>
ServerAlias www.forums.residualvictory.com
ServerAlias forums.residualvictory.com
ServerAdmin webmaster@forums.residualvictory.com
DocumentRoot /home/residual/public_html/forums
BytesLog domlogs/forums.residualvictory.com-bytes_log
ServerName forums.residualvictory.com
User residual
Group residual
CustomLog /usr/local/apache/domlogs/forums.residualvictory.com combined
ScriptAlias /cgi-bin/ /home/residual/public_html/forums/cgi-bin/
</VirtualHost>
And the bind file for his domain
Quote:
; Modified by Web Host Manager
; Zone File for residualvictory.com
$TTL 14400
@ 86400 IN SOA ns1.lucidic.com. root.lucid.lucidic.com. (
2007050705
86400
7200
3600000
86400
)
residualvictory.com. 86400 IN NS ns1.lucidic.com.
residualvictory.com. 86400 IN NS ns2.lucidic.com.
residualvictory.com. 14400 IN A 74.53.106.146
localhost.residualvictory.com. 14400 IN A 127.0.0.1
residualvictory.com. 14400 IN MX 0 residualvictory.com.
mail 14400 IN CNAME residualvictory.com.
www 14400 IN CNAME residualvictory.com.
ftp 14400 IN A 74.53.106.146
forums 14400 IN A 74.53.106.146
www.forums 14400 IN A 74.53.106.146
* 14400 IN A 74.53.106.146
View 10 Replies
View Related
Sep 19, 2014
I've got a quite difficult problem which I don't know hoe to solve. We use a self created ISAPI module which is a "business server" running behind an Apache.
From time to time a client app crashes the server (the circumstances are not quite clear) - and because there is only one server process, all other clients crash as well. Here is an exemplary log of a crash:
Faulting application name: httpd.exe, version: 2.2.22.0, time stamp: 0x4f242d7a
Faulting module name: ABCServer.dll, version: 1.0.0.1, time stamp: 0x53cfffa5
Exception code: 0xc00000fd
Fault offset: 0x00004cf6
Faulting process id: 0x94c
Faulting application start time: 0x01cfc5cc18c67d57
Faulting application path: C:Program Files (x86)Apache Software FoundationApache2.2inhttpd.exe
Faulting module path: C:datawwwabcremoteABCServer.dll
Report Id: d27d5891-31da-11e4-93ff-0003ff4356f9
Faulting package full name:
Faulting package-relative application ID:
Exception code: 0xc00000fd means stack overflow as I learnt. Therefore we configured mpm_winnt_module to use a 8M ThreadStackSize but this didn't work.
A solution might be that Apache starts for every client its own server process with the module ABCServer.dll. Because it is quite small and there are not thousands of customers this sounds like the perfect solution. No other clients/customers would be affected by a crash.
Unfortunately mpm_winnt_module supports only 1 process AFAIK. Worker and Prefork MPM are not available in Apache's Windows version what I read.
How can we configure Apache to start a new module process per client?
View 3 Replies
View Related