Apache :: Subdomains Served By Themselves?

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


ADVERTISEMENT

Apache :: Include Information On Last Page Served In RewriteCond

Feb 8, 2014

I run a the polyglot website [URL] .... and my question is about "how to serve a page in the language preferred by the user, if available?"

At the moment I use Multiviews to add a language code to the requested URL according to the AcceptLanguage header (e.g. if "tr", serve index.html.tr instead of index.html), but this information doesn't always match user wish and I was told that serving different filenames for the same requested URI can prevent proper pages indexing by search engines.

So, I will now store web pages in each language in a specific directory, e.g. subdirectories en, it ru, tr, etc. For instance /tr/index.html will be in Turkish.

On every page, user can change language clicking on a link showing e.g. "uk" for Ukrainian. Now I want that once they do that all pages requested by the same client be served in the same language, unless/until user click on another language link.

I know that I could set a cookie or use HTTP-REFERER for that, but possibly the browser can be set to refuse cookies or not sent the Referer HTTP header.

So my question is : knowing that when a user click on a language link we serve a page in the corresponding directory, how could I reuse that information for next request of the same client (same IP address), including it in a RewriteCond directive so that I can serve requested page in the same language directory, if it exists.

I wish to avoid server side scripting (at present the website is 100% static).

View 1 Replies View Related

Apache :: Unable To Set Subdomains In 2.4

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

Apache :: How To Set Up Virtual Subdomains

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

Configuring Subdomains In Apache On A Localhost

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

Apache :: HTAccess Wildcard Subdomains

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

Apache :: Internal URL Rewrite Across Subdomains

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

Apache :: Redirecting All Subdomains To HTTPS

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

Subdomains Half-way Created And Ignored By Apache

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

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 View Related

How Do I Rid Of The Generic Apache/cPanel Page When Subdomains Are Accessed

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

MS Virtual PC - How To Access My Localhost (Apache) Subdomains On Guest OS?

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

Apache :: Setting Up Domains And Subdomains - Virtual Host

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

Wildcard DNS Subdomains Working, But Existing Subdomains Not

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

Apache :: Will Editing HTAccess File In Cpanel Effect All Wordpress Domains And Subdomains

Mar 26, 2014

I added the following to my cpanel .htaccess file on my hosting account:

<FilesMatch ".pdf$">header set x-robots-tag: noindex
</FilesMatch>

This was to stop Google from crawling and indexing my PDFs, will this work accross all my addon domains and subdomains (which are wordpress) on my hosting account or do I need to take extra measure?

View 4 Replies View Related

Multiple Domains Served From Same DocumentRoot

Oct 19, 2008

I'm doing some work for a friend of mine, and he's requested that he be able to have multiple domains refer to the same DocumentRoot (have all the domains load the same pages).

Is this possible through CPanel?

View 4 Replies View Related

Plesk 11.x / Linux :: How To Know If Nginx Served A Specific Page

Jun 3, 2014

I have setup Nginx to serve static pages. I cache some pages and therefor they are static and should be served by Nginx. Now, how can i check if a specific page actual was served by Nginx and not Apache?

View 1 Replies View Related

Plesk 11.x / Linux :: Content From Subdomain Server Alias Over HTTPS Not Being Served By Nginx

Jul 14, 2014

We're running Plesk 11.5 on a CentOS 6.5 VPS and we would like to resolve the following problem:

We've configured a physical subdomain, lets say sub1.mydomain.com, and set up a couple of aliases for that domain in Plesk under:

Web Server Settings for sub1.mydomain.com > Additional Apache directives > "Additional directives for HTTP"

Code:
ServerAlias mysub1.mydomain.com
ServerAlias mysub2.mydomain.com

And

Web Server Settings for sub1.mydomain.com > Additional Apache directives > "Additional directives for HTTPS"

Code:

ServerAlias mysub1.mydomain.com
ServerAlias mysub2.mydomain.com

This config is working fine until we try to load resources from the alias over ssl, I believe something is missing in the Nginx config. I'm not getting any info using the logs.

For example:

http://sub1.mydomain.com/img/myimage.jpg --> works!
https://sub1.mydomain.com/img/myimage.jpg --> works!

http://mysub1.mydomain.com/img/myimage.jpg --> works!
http://mysub1.mydomain.com/img/myimage.jpg --> not loading

http://mysub2.mydomain.com/img/myimage.jpg --> works!
http://mysub1.mydomain.com/img/myimage.jpg --> not loading

Do we need to specify alternative directives for Nginx?

View 1 Replies View Related

Plesk 11.x / Windows :: Website Error 404.3 - Requested Page Cannot Be Served Because Of Extension Configuration

Jun 29, 2015

We are hosting provider. I running Plesk 11 on Window 2008 64 bit. I have a website error as flow

HTTP Error 404.3 - Not Found

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

View 4 Replies View Related

WHM Subdomains And DNS

Nov 8, 2009

I'm setting up an auto-configuration script to setup accounts in WHM and create subdomains and so far everything is working fine!

But we have a problem - when an account is setup and the subdomain is not working yet when a customer visits it he gets wrong dns information and then when the domain starts working it's not working for him.

I know that flushdns solves this issue under Windows but I don't want to make my newbie customers run complicated commands.

Will a 5 minut delay solve this issue from the moment the account is created to the moment the customer visists the site?

View 3 Replies View Related

Subdomains With WWW

Jun 13, 2008

my control panel is PLESK, when our customers create sub domain they cannot access to their sub domains with www, for example the sub domain is sub.domain.com and I cannot access to this sub domain whit this address www.sub.domain.com .

what should I do to work the sub domains with www ?

View 4 Replies View Related

SSL And Subdomains

Apr 27, 2008

I have a question about SSL certificates and how they function with subdomains.

OVERVIEW
Right now we have [url]. This subdomain houses our client management tool.

PROBLEM
We wanted to use an SSL cert on the above domain so I purchased a wildcard SSL. *.domain.com SSL was ordered and setup.

However, now when we enter[url]we're seeing the content from domain.com, not secure.domain.com

I understand we could use [url]but isn't the point of the wildcard SSL so I can do what I want... access [url]?

This is a cPanel/WHM setup.

View 9 Replies View Related

SSL And Subdomains

Jan 30, 2007

I have googled high and low and i'm about to explode. This has been an issue for the last 4 days...

I have secure.domain.com

I bought a SSL cert for secure.domain.com

I installed the cert

[url] shows the right content

[url]shows the content for [url]
-
I've had this working before on site5, but I share a dedicated account now with WHM/cPanel and it's not working.

it's like the subdomain is being ignored.
-
Tll me if i'm wrong, but each SSL needs its own IP correct? i added an IP for domain.com and WHM seems to have set it for all the subdomains as well.

View 5 Replies View Related

Subdomains

Jan 13, 2007

I purchased a dedicated server several days ago, and realize that this will be a learning curve for me since I'm not experienced in server management.

I have a quick question about subdomains.

My domain names have resolved (or are still resolving). I created two subdomains on a domain, but I can't access them. I'm not sure if there is anything else I should do to get these subdomains to work.

I'm using Plesk8.1

My domains are registered at GoDaddy (and some at RegisterFly)

if I can provide you with any information such as my DNS template, etc...

View 2 Replies View Related

Subdomains

Nov 5, 2007

I know this question has been asked loads of times, but I don't seem to be able to find the answer I'm looking for.

I'm looking to host the forum part of my site on another server. The main part of my site is on a shared hosting account. Which is fine. I'm adding a forum to the site, and was planning on hosting this on my VPS account as a subdomain. As my shared hosting package is only small.

I've edited the DNS with my domain registration provider and added a A record for forum.mydomain.com pointing to the ip of my VPS account. I then created a account on my VPS for the domain/subdomain. However I don't seem to be able to get the subdomain to work

Do I need to ask my shared hosting provider to do anything? or do I need to edit anything on my VPS? The subdomain doesn't appear to be resolving.

View 6 Replies View Related

Mapping Subdomains To Different VPS's

Dec 11, 2008

I was wondering if it is possible to host subdomains on different VPS's? Here is what I am trying to do

PrimaryDomain.com -> Hosted on VPS0
|
- Subdomain1.primaryhost.com -> Hosted on VPS1
|
- Subdomain2.primaryhost.com -> Hosted on VPS2

VPS0, VPS1, VPS2 have different IP addresses.

I tried using A records to point subdomains to different VPS but VPS requires a "primary domain" looks like. Do let me know if this is possible. I tried google but not sure what exactly I shoudl be searching for.

View 4 Replies View Related

Subdomains With Different Passwords

Jun 16, 2008

I'm planning on buying my first domain in order to host various sites of mine in one place. I like the idea of subdomains to separate them, but I was wondering... Is it possible to access different subdomains using different passwords? I'm planning to let a friend of mine use a subdomain to host a site of hers that's related to mine, and I'd like it if she had the security of a different password. I just want to know if I can even do this, and if so, what hosts offer this option?

View 9 Replies View Related

Subdomains And Wildcards ...

May 20, 2008

i have a bit of a problem here. I current have a site sitting on a windows box with wildcards subdomains set up, that are hosted on the same box.

The question i have is can i host blog.domain.com [wordpress blog] on a different box such as a linux one? and make it act as domain.com/blog?

View 6 Replies View Related

Subdomains On Different Servers

May 28, 2008

I have 9 dedicated servers that i use for an applicaton.

what i would like to try and find out is the following.....
all the servers have WHM/Cpanel installed

i want to have a domain (www.domain.com) on 1 server
then i want to somehow have

server1.domain.com (second server)
server2.domain.com (Third server)
etc

Is this possible, if so how would i go about setting this up?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved