You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by brad <br...@nyctelecomm.com> on 2013/08/23 07:19:36 UTC

[users@httpd] vhosts go to default

New Gentoo server and my config appears correct but all domains are being
sunk into default.

 

When accessing:

http://ipv6mailer.com/index.html

 

404 URL /index.html was not found on this server.

 

dev-box-201 ~ # ls -l /home/ipv6mailer/www/

-rw-r--r-- 1 root root      45 Aug 23 04:05 index.html

 

 

in the logs

[Fri Aug 23 04:20:01 2013] [error] [client 24.184.110.39] File does not
exist: /var/www/localhost/htdocs/index.html

 

That's right, /var/www/localhost/htdocs/index.html  does not exist, but
/home/ipv6mailer/www/index.html does and that's the one it's supposed to be
getting.

 

 

dev-box-201 ~ # apache2 -S

VirtualHost configuration:

wildcard NameVirtualHosts and _default_ servers:

*:80                   is a NameVirtualHost

         default server localhost
(/etc/apache2/vhosts.d/00_default_vhost.conf:42)

         port 80 namevhost localhost
(/etc/apache2/vhosts.d/00_default_vhost.conf:42)

         port 80 namevhost www.wemail1.com
(/etc/apache2/vhosts.d/00_default_vhost.conf:55)

         port 80 namevhost www.ipv6mailer.com
(/etc/apache2/vhosts.d/00_default_vhost.conf:70)

Syntax OK

 

 

 

dev-box-201 ~ # cat /etc/apache2/vhosts.d/00_default_vhost.conf

# Virtual Hosts

#

# If you want to maintain multiple domains/hostnames on your

# machine you can setup VirtualHost containers for them. Most configurations

# use only name-based virtual hosts so the server doesn't need to worry
about

# IP addresses. This is indicated by the asterisks in the directives below.

#

# Please see the documentation at

# <URL:http://httpd.apache.org/docs/2.2/vhosts/>

# for further details before you try to setup virtual hosts.

#

# You may use the command line option '-S' to verify your virtual host

# configuration.

 

#<IfDefine DEFAULT_VHOST>

# see bug #178966 why this is in here

 

# Listen: Allows you to bind Apache to specific IP addresses and/or

# ports, instead of the default. See also the <VirtualHost>

# directive.

#

# Change this to Listen on specific IP addresses as shown below to

# prevent Apache from glomming onto all bound IP addresses.

#

#Listen 12.34.56.78:80

Listen 80

 

# Use name-based virtual hosting.

NameVirtualHost *:80

 

# When virtual hosts are enabled, the main host defined in the default

# httpd.conf configuration will go away. We redefine it here so that it is

# still available.

#

# If you disable this vhost by removing -D DEFAULT_VHOST from

# /etc/conf.d/apache2, the first defined virtual host elsewhere will be

# the default.

 

 

# vim: ts=4 filetype=apache

 

<VirtualHost *:80>

        ServerName localhost

        Include /etc/apache2/vhosts.d/default_vhost.include

 

        <IfModule mpm_peruser_module>

                ServerEnvironment apache apache

        </IfModule>

 

</VirtualHost>

 

AddHandler cgi-script .php .php4 .php3

 

 

<VirtualHost *:80>

        ServerName www.wemail1.com

        ServerAlias wemail1.com *.wemail1.com

        ServerPath /wemail1.com

        DocumentRoot /home/wemail1/www

        <Directory "/home/wemail1/www">

                Options Indexes FollowSymLinks MultiViews ExecCGI Includes

                AllowOverride All

                Order allow,deny

                Allow from all

        </Directory>

        CustomLog /var/log/apache2/www.wemail1-access.log combined

        ErrorLog /var/log/apache2/www.wemail1-error.log

</VirtualHost>

 

<VirtualHost *:80>

        ServerName www.ipv6mailer.com

        ServerAlias ipv6mailer *.ipv6mailer.com

        ServerPath /ipv6mailer

        DocumentRoot /home/ipv6mailer/www

        <Directory "/home/ipv6mailer/www">

                Options Indexes FollowSymLinks MultiViews ExecCGI Includes

                AllowOverride All

                Order allow,deny

                Allow from all

        </Directory>

        CustomLog /var/log/apache2/www.ipv6mailer-access.log combined

        ErrorLog /var/log/apache2/www.ipv6mailer-error.log

</VirtualHost>

 

 

 

 

 

 

dev-box-201 ~ # tree -pug /home/

/home/

|-- [drwxr-xr-x ipv6mail ipv6mail]  ipv6mailer

|   |-- [drwxr-xr-x ipv6mail www-pub ]  cgi-bin

|   `-- [drwxr-xr-x ipv6mail www-pub  ]  www

|       |-- [-rw-r--r-- ipv6mail     www-pub    ]  access-denied.php

|       |-- [-rw-r--r-- ipv6mail     www-pub    ]  index.html

|       |-- [-rw-r--r-- ipv6mail     www-pub    ]  login-form.php

|       |-- [-rw-r--r-- ipv6mail     www-pub    ]  campaign-build.php

|       |-- [-rw-r--r-- ipv6mail     www-pub    ]  check.php

|       |-- [-rw-r--r-- ipv6mail     www-pub    ]  style.css

|       `-- [-rw-r--r-- ipv6mail     www-pub    ]  workCampaign.tar

`-- [drwxr-xr-x wemail1  wemail1 ]  wemail1

    |-- [drwxr-xr-x wemail1  www-pub ]  cgi-bin

    `-- [drwxr-xr-x wemail1  www-pub ]  www

 


Re: [users@httpd] rewrite rule along with mod_jk

Posted by Eric Covener <co...@gmail.com>.
On Fri, Aug 23, 2013 at 7:44 AM, vicky <vi...@yahoo.co.in> wrote:
> I would like to redirect the request from apache to tomcat using the URL
> http://dev.market.bills.com/
>    without mentioning any context root in this url ,the request should get
> directed using the above URL to /food-bils application
> which is deployed on Tomcat
>
>   Kindly suggest what is the issue in the below redirection rule, as
> currently the  webpage is coming as blank
>
>
>   <VirtualHost *:10215>
>  RewriteEngine On
> RewriteRule ^/(a*)$ /food-bils

This regex doesn't make any sense.  To match /, use ^/$. You probably
need the [PT] flag too.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] rewrite rule along with mod_jk

Posted by vicky <vi...@yahoo.co.in>.
I would like to redirect the request from apache to tomcat using the URL http://dev.market.bills.com/
   without mentioning any context root in this url ,the request should get directed using the above URL to /food-bils application 
which is deployed on Tomcat
  
  Kindly suggest what is the issue in the below redirection rule, as currently the  webpage is coming as blank
  
  
  <VirtualHost *:10215>
 RewriteEngine On
RewriteRule ^/(a*)$ /food-bils
ServerName dev.market.bills.com
JkMount /* myworker
JkMount /pages/overview myworker
JkMount /pages/overview/* myworker
  
</VirtualHost>

Re: [users@httpd] vhosts go to default

Posted by Eric Covener <co...@gmail.com>.
On Fri, Aug 23, 2013 at 1:19 AM, brad <br...@nyctelecomm.com> wrote:
> New Gentoo server and my config appears correct but all domains are being
> sunk into default.
>
>
>
> When accessing:
>
> http://ipv6mailer.com/index.html

> <VirtualHost *:80>
>         ServerName www.ipv6mailer.com
>         ServerAlias ipv6mailer *.ipv6mailer.com


You don't have "ipv6mailer.com" in your ServerAlias.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org