Apache ignoring Server Alias and going to first virtual hostWhy might Apache ignore a virtual host with a...
Why do we say ‘pairwise disjoint’, rather than ‘disjoint’?
Is it a Cyclops number? "Nobody" knows!
Street obstacles in New Zealand
Plausibility of Mushroom Buildings
How exactly does an Ethernet collision happen in the cable, since nodes use different circuits for Tx and Rx?
Outlet with 3 sets of wires
Does Christianity allow for believing on someone else's behalf?
What are some noteworthy "mic-drop" moments in math?
Why is a very small peak with larger m/z not considered to be the molecular ion?
After `ssh` without `-X` to a machine, is it possible to change `$DISPLAY` to make it work like `ssh -X`?
Which situations would cause a company to ground or recall a aircraft series?
What ability score modifier does a javelin's damage use?
Doesn't allowing a user mode program to access kernel space memory and execute the IN and OUT instructions defeat the purpose of having CPU modes?
Doubts in understanding some concepts of potential energy
Why restrict private health insurance?
Shifting between bemols and diesis in the key signature
Is this Paypal Github SDK reference really a dangerous site?
Why is there an extra space when I type "ls" in the Desktop directory?
I reported the illegal activity of my boss to his boss. My boss found out. Now I am being punished. What should I do?
What is Tony Stark injecting into himself in Iron Man 3?
Is it possible to avoid unpacking when merging Association?
Why is gluten-free baking possible?
Is it possible that a question has only two answers?
Is it possible to find 2014 distinct positive integers whose sum is divisible by each of them?
Apache ignoring Server Alias and going to first virtual host
Why might Apache ignore a virtual host with a ServerName matching the requested URL?Apache Centos 6.5 Only Loading First Virtual HostVirtualHost ignores ServerName and ServerAliasApache2 multiple hostnames redirected to oneApache routes traffic to wrong VirtualHost the first time it is startedApache Virtual Hosts Not WorkingApache 2 vhost with two names (host alias?)configs for several sites in apache with sslUbuntu 12.04 Apache2 Virtual Host Port *.80 Not WorkingVirtualHost's server name does not work (shows /var/www), all aliases doApache2 disable catch all virtual hostApache fails after configuration of 2 virtual hostsCan't follow symbolic link in apache2
I'm having problems getting my ServerAlias domains to work correctly. apache2ctl -S gives:
IP.ADDRESS:80 is a NameVirtualHost
default server byteinsight.net (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost byteinsight.net (/etc/apache2/sites-enabled/000-default.conf:1)
wild alias *.byteinsight.uk
wild alias *.byteinsight.co.uk
wild alias *.bristolwebsitedesigner.co.uk
port 80 namevhost davies-barnard.co.uk (/etc/apache2/sites-enabled/000-default.conf:15)
wild alias *.davies-barnard.uk
port 80 namevhost tdaviesbarnard.co.uk (/etc/apache2/sites-enabled/000-default.conf:30)
wild alias *.greenotter.co.uk
port 80 namevhost weather.davies-barnard.uk (/etc/apache2/sites-enabled/000-default.conf:57)
port 80 namevhost weewx.davies-barnard.uk (/etc/apache2/sites-enabled/000-default.conf:70)
port 80 namevhost compu2learn.uk (/etc/apache2/sites-enabled/000-default.conf:84)
wild alias *.compu2learn.co.uk
wild alias *.compu2learn.org.uk
I've followed the guidance here and added the ServerName into the virtual host declaration e.g.
<VirtualHost byteinsight.net:80>...
and I have restarted Apache. I tried to add NameVirtualHost *:80 but was told it was not necessary and was going to be removed at the next update. I have also looked at this one and updated my settings to reflect the example given on the apache TroubleshootingVhosts page.
What have I missed?
Thanks
Chris
apache-2.2 virtualhost serveralias
bumped to the homepage by Community♦ 15 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm having problems getting my ServerAlias domains to work correctly. apache2ctl -S gives:
IP.ADDRESS:80 is a NameVirtualHost
default server byteinsight.net (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost byteinsight.net (/etc/apache2/sites-enabled/000-default.conf:1)
wild alias *.byteinsight.uk
wild alias *.byteinsight.co.uk
wild alias *.bristolwebsitedesigner.co.uk
port 80 namevhost davies-barnard.co.uk (/etc/apache2/sites-enabled/000-default.conf:15)
wild alias *.davies-barnard.uk
port 80 namevhost tdaviesbarnard.co.uk (/etc/apache2/sites-enabled/000-default.conf:30)
wild alias *.greenotter.co.uk
port 80 namevhost weather.davies-barnard.uk (/etc/apache2/sites-enabled/000-default.conf:57)
port 80 namevhost weewx.davies-barnard.uk (/etc/apache2/sites-enabled/000-default.conf:70)
port 80 namevhost compu2learn.uk (/etc/apache2/sites-enabled/000-default.conf:84)
wild alias *.compu2learn.co.uk
wild alias *.compu2learn.org.uk
I've followed the guidance here and added the ServerName into the virtual host declaration e.g.
<VirtualHost byteinsight.net:80>...
and I have restarted Apache. I tried to add NameVirtualHost *:80 but was told it was not necessary and was going to be removed at the next update. I have also looked at this one and updated my settings to reflect the example given on the apache TroubleshootingVhosts page.
What have I missed?
Thanks
Chris
apache-2.2 virtualhost serveralias
bumped to the homepage by Community♦ 15 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm having problems getting my ServerAlias domains to work correctly. apache2ctl -S gives:
IP.ADDRESS:80 is a NameVirtualHost
default server byteinsight.net (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost byteinsight.net (/etc/apache2/sites-enabled/000-default.conf:1)
wild alias *.byteinsight.uk
wild alias *.byteinsight.co.uk
wild alias *.bristolwebsitedesigner.co.uk
port 80 namevhost davies-barnard.co.uk (/etc/apache2/sites-enabled/000-default.conf:15)
wild alias *.davies-barnard.uk
port 80 namevhost tdaviesbarnard.co.uk (/etc/apache2/sites-enabled/000-default.conf:30)
wild alias *.greenotter.co.uk
port 80 namevhost weather.davies-barnard.uk (/etc/apache2/sites-enabled/000-default.conf:57)
port 80 namevhost weewx.davies-barnard.uk (/etc/apache2/sites-enabled/000-default.conf:70)
port 80 namevhost compu2learn.uk (/etc/apache2/sites-enabled/000-default.conf:84)
wild alias *.compu2learn.co.uk
wild alias *.compu2learn.org.uk
I've followed the guidance here and added the ServerName into the virtual host declaration e.g.
<VirtualHost byteinsight.net:80>...
and I have restarted Apache. I tried to add NameVirtualHost *:80 but was told it was not necessary and was going to be removed at the next update. I have also looked at this one and updated my settings to reflect the example given on the apache TroubleshootingVhosts page.
What have I missed?
Thanks
Chris
apache-2.2 virtualhost serveralias
I'm having problems getting my ServerAlias domains to work correctly. apache2ctl -S gives:
IP.ADDRESS:80 is a NameVirtualHost
default server byteinsight.net (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost byteinsight.net (/etc/apache2/sites-enabled/000-default.conf:1)
wild alias *.byteinsight.uk
wild alias *.byteinsight.co.uk
wild alias *.bristolwebsitedesigner.co.uk
port 80 namevhost davies-barnard.co.uk (/etc/apache2/sites-enabled/000-default.conf:15)
wild alias *.davies-barnard.uk
port 80 namevhost tdaviesbarnard.co.uk (/etc/apache2/sites-enabled/000-default.conf:30)
wild alias *.greenotter.co.uk
port 80 namevhost weather.davies-barnard.uk (/etc/apache2/sites-enabled/000-default.conf:57)
port 80 namevhost weewx.davies-barnard.uk (/etc/apache2/sites-enabled/000-default.conf:70)
port 80 namevhost compu2learn.uk (/etc/apache2/sites-enabled/000-default.conf:84)
wild alias *.compu2learn.co.uk
wild alias *.compu2learn.org.uk
I've followed the guidance here and added the ServerName into the virtual host declaration e.g.
<VirtualHost byteinsight.net:80>...
and I have restarted Apache. I tried to add NameVirtualHost *:80 but was told it was not necessary and was going to be removed at the next update. I have also looked at this one and updated my settings to reflect the example given on the apache TroubleshootingVhosts page.
What have I missed?
Thanks
Chris
apache-2.2 virtualhost serveralias
apache-2.2 virtualhost serveralias
edited Apr 13 '17 at 12:14
Community♦
1
1
asked Apr 7 '16 at 18:37
Davies-BarnardDavies-Barnard
136
136
bumped to the homepage by Community♦ 15 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 15 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Ok, so I sussed this out in the end.
First I needed to heed the advice from VirtualHost ignores ServerName and ServerAlias and put the domain as listed in my main apache.conf file as global ServerName first in the virtual hosts file.
Main host goes away
If you are adding virtual hosts to an existing web server, you must
also create a block for the existing host. The ServerName and
DocumentRoot included in this virtual host should be the same as the
global ServerName and DocumentRoot. List this virtual host first in
the configuration file so that it will act as the default host.
I also need to use full domains and not wild cards e.g.
ServerAlias www.domain.com domain.com
and not
ServerAlias *.domain.com.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f768884%2fapache-ignoring-server-alias-and-going-to-first-virtual-host%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Ok, so I sussed this out in the end.
First I needed to heed the advice from VirtualHost ignores ServerName and ServerAlias and put the domain as listed in my main apache.conf file as global ServerName first in the virtual hosts file.
Main host goes away
If you are adding virtual hosts to an existing web server, you must
also create a block for the existing host. The ServerName and
DocumentRoot included in this virtual host should be the same as the
global ServerName and DocumentRoot. List this virtual host first in
the configuration file so that it will act as the default host.
I also need to use full domains and not wild cards e.g.
ServerAlias www.domain.com domain.com
and not
ServerAlias *.domain.com.
add a comment |
Ok, so I sussed this out in the end.
First I needed to heed the advice from VirtualHost ignores ServerName and ServerAlias and put the domain as listed in my main apache.conf file as global ServerName first in the virtual hosts file.
Main host goes away
If you are adding virtual hosts to an existing web server, you must
also create a block for the existing host. The ServerName and
DocumentRoot included in this virtual host should be the same as the
global ServerName and DocumentRoot. List this virtual host first in
the configuration file so that it will act as the default host.
I also need to use full domains and not wild cards e.g.
ServerAlias www.domain.com domain.com
and not
ServerAlias *.domain.com.
add a comment |
Ok, so I sussed this out in the end.
First I needed to heed the advice from VirtualHost ignores ServerName and ServerAlias and put the domain as listed in my main apache.conf file as global ServerName first in the virtual hosts file.
Main host goes away
If you are adding virtual hosts to an existing web server, you must
also create a block for the existing host. The ServerName and
DocumentRoot included in this virtual host should be the same as the
global ServerName and DocumentRoot. List this virtual host first in
the configuration file so that it will act as the default host.
I also need to use full domains and not wild cards e.g.
ServerAlias www.domain.com domain.com
and not
ServerAlias *.domain.com.
Ok, so I sussed this out in the end.
First I needed to heed the advice from VirtualHost ignores ServerName and ServerAlias and put the domain as listed in my main apache.conf file as global ServerName first in the virtual hosts file.
Main host goes away
If you are adding virtual hosts to an existing web server, you must
also create a block for the existing host. The ServerName and
DocumentRoot included in this virtual host should be the same as the
global ServerName and DocumentRoot. List this virtual host first in
the configuration file so that it will act as the default host.
I also need to use full domains and not wild cards e.g.
ServerAlias www.domain.com domain.com
and not
ServerAlias *.domain.com.
edited Apr 13 '17 at 12:14
Community♦
1
1
answered Apr 7 '16 at 20:16
Davies-BarnardDavies-Barnard
136
136
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f768884%2fapache-ignoring-server-alias-and-going-to-first-virtual-host%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown