Re: Almost There

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/08/2014 12:39 PM, Eric Covener wrote:
> On Sat, Nov 8, 2014 at 12:53 PM, Steve Matzura <sm@xxxxxxxxxxxxxx> wrote:
>> <VirtualHost theglobalvoice.info:80>
> Don't put a hostname there. Use *:80 throughout if you don't care what
> local interface was used (you don't).
>
> That's why theglobalvoice.info steals all of your requests. It
> resolves to the IP address all of your vhosts use, but is an exact
> match compares to *:80.  If they were all *:80, it would come down to
> the ServerName check the way you want.
>
Make a backup copy of your httpd.conf:

cp /path/to/httpd.conf /path/to/httpd.conf.bk

and replace with the attachment and see what happens.
ServerRoot "/etc/apache2"
LockFile /var/lock/apache2/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

<IfModule mpm_worker_module>
    StartServers          2
    MaxClients          150
    MinSpareThreads      25
    MaxSpareThreads      75 
    ThreadsPerChild      25
    MaxRequestsPerChild   0
</IfModule>

User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

DefaultType text/plain
HostnameLookups Off
ErrorLog /var/log/apache2/error.log
LogLevel warn
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/httpd.conf
Include /etc/apache2/ports.conf
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined
Include /etc/apache2/conf.d/
NameVirtualHost 92.243.4.196:80
### 000-default:

<VirtualHost *:80>
	ServerAdmin webmaster@xxxxxxxxxxxxxxxxxx
	ServerName www.equaleyesradio.com
	Serveralias equaleyesradio.com *.equaleyesradio.com
	DocumentRoot /var/www/equaleyesradio.com/
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/equaleyesradio.com>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog /var/log/apache2/error.log

	# Possible values include: debug, info, notice, warn, error,
crit,
	# alert, emerg.
	LogLevel warn

	CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

### 001-theglobalvoice.info:

<VirtualHost *:80>
	ServerAdmin webmaster@xxxxxxxxxxxxxxxxxxx
	ServerName www.theglobalvoice.info
	Serveralias theglobalvoice.info *.theglobalvoice.info
	DocumentRoot /var/www/theglobalvoice.info/
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>

        <Directory /var/www/theglobalvoice.info/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        <Directory /var/www/theglobalvoice.info/staff>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all

		AuthType Basic
		AuthName "Staff Area"
		AuthBasicProvider file
		AuthUserFile
/var/www/theglobalvoice.info/staff/.htpasswd
		require valid-user
        </Directory>

        <Directory /var/www/theglobalvoice.info/admin>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all

		AuthType Basic
		AuthName "Admin Area"
		AuthBasicProvider file
		AuthUserFile
/var/www/theglobalvoice.info/admin/.htpasswd
		require valid-user
        </Directory>


	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options Indexes FollowSymLinks Includes ExecCGI
MultiViews
#ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog /var/log/apache2/theglobalvoice.info/error.log

	# Possible values include: debug, info, notice, warn, error,
crit,
	# alert, emerg.
	LogLevel warn

	CustomLog /var/log/apache2/theglobalvoice.info/access.log
combined
	ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux