So I am wondering in addition to the instructions given: https://virtualmin.com/documentation/system/os/ubuntu-precise-to-trusty
do i also need to adjust the way NamedVirtualHost is configured
currently its:
NameVirtualHost 108.61.213.138:80 NameVirtualHost 108.61.213.225:80
and then a snipet from sites-enabled: root@caesium:/etc/apache2/sites-enabled# cat qtrust.com.au.conf SuexecUserGroup "#1006" "#1006" ServerName qtrust.com.au ServerAlias www.qtrust.com.au ServerAlias webmail.qtrust.com.au ServerAlias admin.qtrust.com.au DocumentRoot /home/qtrust/public_html ErrorLog /var/log/virtualmin/qtrust.com.au_error_log CustomLog /var/log/virtualmin/qtrust.com.au_access_log combined ScriptAlias /cgi-bin/ /home/qtrust/cgi-bin/ ScriptAlias /awstats/ /home/qtrust/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch AddHandler fcgid-script .php AddHandler fcgid-script .php5 FCGIWrapper /home/qtrust/fcgi-bin/php5.fcgi .php
my question is should i replace all instances of ip.ip.ip.ip:port to *:port
?
Regards
Angus
Comments
Submitted by andreychek on Mon, 08/04/2014 - 09:16 Comment #1
Howdy -- you shouldn't need to change that.
In fact, I'd suggest keeping it as-is.
Are you experiencing a problem of some sort though?
Submitted by gusswendson on Mon, 08/04/2014 - 14:52 Pro Licensee Comment #2
I wouldnt say a problem, just a this feature is about to be deprecated :)
see below: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/apache2.conf:240
Submitted by andreychek on Mon, 08/04/2014 - 14:59 Comment #3
Ah, yeah the "NameVirtualHost" lines themselves are no longer necessary.
The line in your "qtrust.com.au.conf" file is still correct, and it should continue to have the IP address that it has now.
What's changed is that you no longer need to specify "NameVirtualHost x.x.x.x:80" in the Apache config.
Beginning with Apache 2.4, Apache will assume that it's a Name-based VirtualHost if the IP address shows up for more than one domain. It's no longer necessary to explicitly state that.
Submitted by gusswendson on Mon, 08/04/2014 - 16:48 Pro Licensee Comment #4
Excellent :)
next question is when i create a new site its now wanting to use *:port as the NameVirtualHost in the config file for the domain in /etc/apache2/sites-enabled (sites-available)
is there something i need to change or adjust? Ive only noticed this happening since going to 14.04, but that said it may of been happening prior with 12.04 and virtulmin 4.09/08
Regards
Gus
Submitted by andreychek on Mon, 08/04/2014 - 17:14 Comment #5
Are there any files in
/etc/apache2/sites-enabled
that contain that "*:80" in them? That could cause Virtualmin to use that syntax for new domains.You could try running this command to determine that:
grep -i '<virtualhost ' /etc/apache2/sites-enabled/*.conf
Submitted by gusswendson on Mon, 08/04/2014 - 19:30 Pro Licensee Comment #6
thanks :)
there is one entry! root@caesium:~# grep -i '<virtualhost ' /etc/apache2/sites-enabled/*.conf ................/etc/apache2/sites-enabled/000-default.conf:
should i adjust the default? :)
Cheers
Gus
Submitted by andreychek on Mon, 08/04/2014 - 19:38 Comment #7
Yeah you don't actually need that
000-default.conf
file, you're welcome to disable that and then restart Apache.Submitted by gusswendson on Mon, 08/04/2014 - 20:24 Pro Licensee Comment #8
thank you :)
Submitted by gusswendson on Sat, 08/16/2014 - 18:11 Pro Licensee Comment #9
G'day Andy
so i just created a new host, and had to manually change the /etc/apache/sites-availabe (enabled) top line from
<VirtualHost *:80>
SuexecUserGroup "#1009" "#1009"
ServerName reeltimepeople.com.au
ServerAlias www.reeltimepeople.com.au
ServerAlias webmail.reeltimepeople.com.au
to
<VirtualHost 108.61.213.138:80>
SuexecUserGroup "#1009" "#1009"
ServerName reeltimepeople.com.au
ServerAlias www.reeltimepeople.com.au
ServerAlias webmail.reeltimepeople.com.au
is there something i should be adjusting? of note: this only happened since the 14.04 LTS update.
Submitted by andreychek on Sat, 08/16/2014 - 18:16 Comment #10
Hmm, I'm not sure I see what changed between the "before" and "after", what update was it you needed to make to that domain?
And was that domain added before or after you upgraded to Ubuntu 14.04?
Submitted by gusswendson on Sat, 08/16/2014 - 18:23 Pro Licensee Comment #11
Sorry so what i had to change was:
VirtualHost *:80 to VirtualHost 108.61.213.138:80
and this site was added after the update to 14.04 LTS.
Submitted by andreychek on Sat, 08/16/2014 - 18:44 Comment #12
Aha, I understand now! Is there by chance a new file named 000-default in your /etc/apache2/sites-enabled directory? If so, can you check if it's using "*:80"?
If it's not, I suspect some other file is -- but chances are that a 000-default file was created by Apache during the upgrade process.
Submitted by gusswendson on Sat, 08/16/2014 - 20:39 Pro Licensee Comment #13
it was in there, however i removed it! :)
and from sites-available
of note is the screen shot, not sure where its getting that config from..
Submitted by andreychek on Sat, 08/16/2014 - 20:44 Comment #14
Just to clarify, are you saying that even after removing that, Virtualmin is still adding Virtual Host entries using the *:80 format?
Submitted by gusswendson on Sat, 08/16/2014 - 20:45 Pro Licensee Comment #15
root@caesium:/etc/apache2# grep -ir "VirtualHost" . ./apache2.conf.dpkg-old:# If you do not specify an ErrorLog directive within a ./apache2.conf.dpkg-old:# logged here. If you do define an error logfile for a ./apache2.conf.dpkg-old:NameVirtualHost 108.61.213.138:80 ./apache2.conf.dpkg-old:NameVirtualHost 108.61.213.225:80 ./conf-available/localized-error-pages.conf:# even on a per-VirtualHost basis. If you include the Alias in the global server ./conf-available/other-vhosts-access-log.conf:# Define an access log for VirtualHosts that don't define their own logfile ./sites-available/fitnessbythebay.com.au.conf: ./sites-available/fitnessbythebay.com.au.conf: ./sites-available/reeltimeproductions.com.au.conf: ./sites-available/reeltimeproductions.com.au.conf: ./sites-available/gciaustralia.com.au.conf: ./sites-available/gciaustralia.com.au.conf: ./sites-available/remogreco.com.conf: ./sites-available/remogreco.com.conf: ./sites-available/default.disabled: ./sites-available/default.disabled: ./sites-available/owncloud.gusswendson.com.conf: ./sites-available/owncloud.gusswendson.com.conf: ./sites-available/stevencollette.com.conf: ./sites-available/stevencollette.com.conf: ./sites-available/reeltimepeople.com.au.conf: ./sites-available/reeltimepeople.com.au.conf: ./sites-available/qtrust.com.au.conf: ./sites-available/qtrust.com.au.conf: ./apache2.conf:# If you do not specify an ErrorLog directive within a ./apache2.conf:# logged here. If you do define an error logfile for a ./apache2.conf:NameVirtualHost 108.61.213.138:80 ./apache2.conf:NameVirtualHost 108.61.213.225:80 ./apache2.conf.old:# If you do not specify an ErrorLog directive within a ./apache2.conf.old:# logged here. If you do define an error logfile for a root@caesium:/etc/apache2#
Submitted by gusswendson on Sat, 08/16/2014 - 20:47 Pro Licensee Comment #16
So i cant really see anything out of place there...
attached is the proper grep output!
cheers
ps: thanks for your quick response. this isnt urgent by any strech :)
Submitted by andreychek on Sat, 08/16/2014 - 21:08 Comment #17
Jamie, when using Apache 2.4 (which no longer uses a "NameVirtualHost" line), how does Virtualmin determine how to format the "VirtualHost" line for each domain's Apache config?
In this case here, it seems to be adding that using "VirtualHost *:80", but so far as we can see, all the existing entries use "x.x.x.x:80", and there is no NameVirtualHost line.
In this case the goal is to get it to add that using "VirtualHost x.x.x.x:80".
Submitted by JamieCameron on Sun, 08/17/2014 - 16:40 Comment #18
So for Apache 2.4, Virtualmin will use *:80 for IPs that are shared, and x.x.x.x:80 for private IPs.
Submitted by gusswendson on Sun, 08/17/2014 - 19:54 Pro Licensee Comment #19
"So for Apache 2.4, Virtualmin will use *:80 for IPs that are shared, and x.x.x.x:80 for private IPs."
Mate, is there a way to get it to use x.x.x.x:80 for shared and private ip's? :)
its a non issue but yeah It would be handy.
Submitted by JamieCameron on Mon, 08/18/2014 - 19:37 Comment #20
Currently, no. But I am starting to suspect that using x.x.x.x:80 in the case where no existing VirtualHost is using *:80 would make sense.
Submitted by gusswendson on Mon, 08/18/2014 - 19:48 Pro Licensee Comment #21
agreed :)
thanks... sounds like 4.10 will include this!! ;-)
Gus
Submitted by JamieCameron on Tue, 08/19/2014 - 18:01 Comment #22
I'll look into this and see what improvements make sense - certainly the currrent logic could be massively cleaned up, especially now that Apache 2.4 has simplified the way virtual hosts work.
Submitted by JamieCameron on Sun, 10/05/2014 - 11:47 Comment #23
FYI, the 4.12 Virtualmin release will use IPs instead of * in the VirtualHost directive.
Submitted by Issues on Sun, 10/19/2014 - 11:50 Comment #24
Automatically closed -- issue fixed for 2 weeks with no activity.