Re: [users@httpd] virtual host DocumentRoot being ignored

2020-12-13 Thread Lucien Gentis
You can also try to replace "IncludeOptional conf.d/*.conf" by 
"IncludeOptional /etc/httpd/conf.d/*.conf"


Le 13/12/2020 à 18:26, Daniel Ferradal a écrit :

check "apachectl -S" output to make sure what virtualhosts you are really using.

El dom, 13 dic 2020 a las 15:20, Richard B. Pyne () escribió:

Hi Lucien,

Yes. that is the case. It is /etc/httpd/conf.d

The last line of the main config file /etc/httpd/conf/httpd.conf file is

IncludeOptional conf.d/*.conf


On 12/13/2020 5:38 AM, Lucien Gentis wrote:

Hello Richard,

I don't know how CentOs configures httpd, but I suppose You have a main
config file which includes all config files contained in
/etc/httpd/conf.d ; is it the case ?

Le 13/12/2020 à 13:26, Richard B. Pyne a écrit :

I know this has been asked numerous time, and I have read hours worth
of post and guides with no success. I set up a new server running
Apache 2.4.6 on CentOS 7.9 a while back with only one virtual host.
The original vhost still works, but the second one ignores the host name.

I have two virtual host conf files in /etc/httpd/conf.d

example1.com.conf


   ServerName example1.com
   ServerAlias www.example1.com
   DocumentRoot /var/www/t/example1.com/public_html
   ServerAdmin webmas...@example.com
   CustomLog /var/www/t/example1.com/access_log combined
   ErrorLog /var/www/t/example1.com/error_log

   
 Options -Indexes +FollowSymlinks
 AllowOverride All
 Require all granted
   




example2.com.conf


   ServerName example2.com
   ServerAlias www.example2.com
   DocumentRoot /var/www/t/example2.com/public_html
   ServerAdmin webmas...@example.com
   CustomLog /var/www/t/example2.com/access_log combined
   ErrorLog /var/www/t/example2.com/error_log

   
 Options -Indexes +FollowSymlinks
 AllowOverride All
 Require all granted
   



I enabled ForensicLog and the log shows the correct Host: values,
httpd -S shows all of the conf files and ServerNames, but regardless,
all requests are being served from the /var/www/html default
DocumentRoot.

Any help will be greatly appreciated.

Thanks,
--Richard

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


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


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





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



Re: [users@httpd] virtual host DocumentRoot being ignored

2020-12-13 Thread Daniel Ferradal
check "apachectl -S" output to make sure what virtualhosts you are really using.

El dom, 13 dic 2020 a las 15:20, Richard B. Pyne () escribió:
>
> Hi Lucien,
>
> Yes. that is the case. It is /etc/httpd/conf.d
>
> The last line of the main config file /etc/httpd/conf/httpd.conf file is
>
> IncludeOptional conf.d/*.conf
>
>
> On 12/13/2020 5:38 AM, Lucien Gentis wrote:
> > Hello Richard,
> >
> > I don't know how CentOs configures httpd, but I suppose You have a main
> > config file which includes all config files contained in
> > /etc/httpd/conf.d ; is it the case ?
> >
> > Le 13/12/2020 à 13:26, Richard B. Pyne a écrit :
> >> I know this has been asked numerous time, and I have read hours worth
> >> of post and guides with no success. I set up a new server running
> >> Apache 2.4.6 on CentOS 7.9 a while back with only one virtual host.
> >> The original vhost still works, but the second one ignores the host name.
> >>
> >> I have two virtual host conf files in /etc/httpd/conf.d
> >>
> >> example1.com.conf
> >>
> >> 
> >>   ServerName example1.com
> >>   ServerAlias www.example1.com
> >>   DocumentRoot /var/www/t/example1.com/public_html
> >>   ServerAdmin webmas...@example.com
> >>   CustomLog /var/www/t/example1.com/access_log combined
> >>   ErrorLog /var/www/t/example1.com/error_log
> >>
> >>   
> >> Options -Indexes +FollowSymlinks
> >> AllowOverride All
> >> Require all granted
> >>   
> >>
> >> 
> >>
> >>
> >> example2.com.conf
> >>
> >> 
> >>   ServerName example2.com
> >>   ServerAlias www.example2.com
> >>   DocumentRoot /var/www/t/example2.com/public_html
> >>   ServerAdmin webmas...@example.com
> >>   CustomLog /var/www/t/example2.com/access_log combined
> >>   ErrorLog /var/www/t/example2.com/error_log
> >>
> >>   
> >> Options -Indexes +FollowSymlinks
> >> AllowOverride All
> >> Require all granted
> >>   
> >>
> >> 
> >>
> >> I enabled ForensicLog and the log shows the correct Host: values,
> >> httpd -S shows all of the conf files and ServerNames, but regardless,
> >> all requests are being served from the /var/www/html default
> >> DocumentRoot.
> >>
> >> Any help will be greatly appreciated.
> >>
> >> Thanks,
> >> --Richard
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> >> For additional commands, e-mail: users-h...@httpd.apache.org
> >>
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> > For additional commands, e-mail: users-h...@httpd.apache.org
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>


-- 
Daniel Ferradal
HTTPD Project
#httpd help at Freenode

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



Re: [users@httpd] virtual host DocumentRoot being ignored

2020-12-13 Thread Richard B. Pyne

Hi Lucien,

Yes. that is the case. It is /etc/httpd/conf.d

The last line of the main config file /etc/httpd/conf/httpd.conf file is

IncludeOptional conf.d/*.conf


On 12/13/2020 5:38 AM, Lucien Gentis wrote:

Hello Richard,

I don't know how CentOs configures httpd, but I suppose You have a main 
config file which includes all config files contained in 
/etc/httpd/conf.d ; is it the case ?


Le 13/12/2020 à 13:26, Richard B. Pyne a écrit :
I know this has been asked numerous time, and I have read hours worth 
of post and guides with no success. I set up a new server running 
Apache 2.4.6 on CentOS 7.9 a while back with only one virtual host. 
The original vhost still works, but the second one ignores the host name.


I have two virtual host conf files in /etc/httpd/conf.d

example1.com.conf


  ServerName example1.com
  ServerAlias www.example1.com
  DocumentRoot /var/www/t/example1.com/public_html
  ServerAdmin webmas...@example.com
  CustomLog /var/www/t/example1.com/access_log combined
  ErrorLog /var/www/t/example1.com/error_log

  
    Options -Indexes +FollowSymlinks
    AllowOverride All
    Require all granted
  




example2.com.conf


  ServerName example2.com
  ServerAlias www.example2.com
  DocumentRoot /var/www/t/example2.com/public_html
  ServerAdmin webmas...@example.com
  CustomLog /var/www/t/example2.com/access_log combined
  ErrorLog /var/www/t/example2.com/error_log

  
    Options -Indexes +FollowSymlinks
    AllowOverride All
    Require all granted
  



I enabled ForensicLog and the log shows the correct Host: values, 
httpd -S shows all of the conf files and ServerNames, but regardless, 
all requests are being served from the /var/www/html default 
DocumentRoot.


Any help will be greatly appreciated.

Thanks,
--Richard

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



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



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



Re: [users@httpd] virtual host DocumentRoot being ignored

2020-12-13 Thread Lucien Gentis

Hello Richard,

I don't know how CentOs configures httpd, but I suppose You have a main 
config file which includes all config files contained in 
/etc/httpd/conf.d ; is it the case ?


Le 13/12/2020 à 13:26, Richard B. Pyne a écrit :
I know this has been asked numerous time, and I have read hours worth 
of post and guides with no success. I set up a new server running 
Apache 2.4.6 on CentOS 7.9 a while back with only one virtual host. 
The original vhost still works, but the second one ignores the host name.


I have two virtual host conf files in /etc/httpd/conf.d

example1.com.conf


  ServerName example1.com
  ServerAlias www.example1.com
  DocumentRoot /var/www/t/example1.com/public_html
  ServerAdmin webmas...@example.com
  CustomLog /var/www/t/example1.com/access_log combined
  ErrorLog /var/www/t/example1.com/error_log

  
    Options -Indexes +FollowSymlinks
    AllowOverride All
    Require all granted
  




example2.com.conf


  ServerName example2.com
  ServerAlias www.example2.com
  DocumentRoot /var/www/t/example2.com/public_html
  ServerAdmin webmas...@example.com
  CustomLog /var/www/t/example2.com/access_log combined
  ErrorLog /var/www/t/example2.com/error_log

  
    Options -Indexes +FollowSymlinks
    AllowOverride All
    Require all granted
  



I enabled ForensicLog and the log shows the correct Host: values, 
httpd -S shows all of the conf files and ServerNames, but regardless, 
all requests are being served from the /var/www/html default 
DocumentRoot.


Any help will be greatly appreciated.

Thanks,
--Richard

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



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



Re: [users@httpd] virtual host

2018-09-28 Thread Carmel NY
On Fri, 28 Sep 2018 15:40:49 +0200, Sander Smeenk stated:

>Quoting Carmel NY (carmel...@outlook.com):
>
>> >Please elaborate on the 'not working out so well' bit.  
>
>> >> apachectl -S
>> >> VirtualHost configuration:
>> >> *:80   stem.example.net
>> >> (/usr/local/etc/apache24/extra/httpd-vhosts.conf:24)
>> >> *:443  example.net
>> >> (/usr/local/etc/apache24/extra/httpd-ssl.conf:121)
>
>> Okay, on a stock FreeBSD installation, maybe on others too, there is an
>> index.html file in the document root that displays, "It Works" when it is
>> access. Now, when I type in my normal web address; http://example.net, the
>> vhost site is displayed. However, if I type in the vhost name;
>> http://stem.example.net, the regular site is display; ie. "It Works". That
>> is exactly opposite of what it is supposed to be doing. That make no sense,
>> so I know that I am doing something really wrong.  
>
>This is Apache 2.4.x ?
>
>I don't see the 'default server ...','ip.add.re.ss:port is a NameVirtualHost'
>and 'alias'-lines in your 'apache2ctl -S' output.
>
>Did you remove those yourself?  It always helps not to obfuscate your configs
>and logs when seeking help.
>
># apache2ctl -S
>VirtualHost configuration:
>213.154.236.176:443is a NameVirtualHost
>   default server www.freshdot.net
> (/etc/apache2/sites-enabled/01.www.freshdot.net.conf:1) port 443 namevhost
> www.freshdot.net (/etc/apache2/sites-enabled/01.www.freshdot.net.conf:1)
> alias freshdot.net [ .. ]
>[2001:7b8:633:1:213:154:236:176]:443 is a NameVirtualHost
>   default server www.freshdot.net
> (/etc/apache2/sites-enabled/01.www.freshdot.net.conf:1) port 443 namevhost
> www.freshdot.net (/etc/apache2/sites-enabled/01.www.freshdot.net.conf:1)
> alias freshdot.net
>
>Apache will, by default, treat the first vhost definition it finds as
>the default vhost for that IP/port combo. Try defining a simple vhost
>before defining the stem.example.net vhost so that no longer is your
>default vhost.
>
>Regards,
>-Sndr.

I don't have an "apache2ctl" program. I do have an "apachectl" one though.
This is my output:

apachectl -S
VirtualHost configuration:
*:80   stem.example.net (/usr/local/etc/apache24/extra/httpd-vhosts.conf:24)
*:443  example.net (/usr/local/etc/apache24/extra/httpd-ssl.conf:121)
ServerRoot: "/usr/local"
Main DocumentRoot: "/usr/local/www/apache24/data"
Main ErrorLog: "/var/log/httpd-error.log"
Mutex ssl-stapling-refresh: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/" mechanism=default
Mutex mpm-accept: using_defaults
PidFile: "/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www" id=80
Group: name="www" id=80

httpd -V
Server version: Apache/2.4.35 (FreeBSD)
Server built:   unknown
Server's Module Magic Number: 20120211:82
Server loaded:  APR 1.6.3, APR-UTIL 1.6.1
Compiled using: APR 1.6.3, APR-UTIL 1.6.1
Architecture:   64-bit
Server MPM: prefork
  threaded: no
forked: yes (variable process count)
Server compiled with
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
 -D APR_USE_FLOCK_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr/local"
 -D SUEXEC_BIN="/usr/local/bin/suexec"
 -D DEFAULT_PIDLOG="/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="/var/run/apache_runtime_status"
 -D DEFAULT_ERRORLOG="/var/log/httpd-error.log"
 -D AP_TYPES_CONFIG_FILE="etc/apache24/mime.types"
 -D SERVER_CONFIG_FILE="etc/apache24/httpd.conf"


Now, in the httpd.conf file, I changed the "ServerName www.example.net:80" to
"ServerName example.net:80" and now the vhost appears to be working correctly.

So, it appears that my next challenge will be to get SSL working on the vhost.

Thanks for your help. I am sure I will be needing more shortly.

-- 
Carmel

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



Re: [users@httpd] virtual host

2018-09-28 Thread Ruben Safir
Sorry, I need to correct my English.  Seems my fingers don't find the
right keys all the time ;)


On 9/28/18 7:10 AM, Carmel NY wrote:
> Okay, on a stock FreeBSD installation, maybe on others too, there is an
> index.html file in the document root that displays,


In my experience you can't expect a stock instllation to work,
especially since you seem to be pointing at different directories than
the stock installation.

The biary might be fine but you need to make sure your set up conforms
to the expectations of the binary or that your apachectl is called
correctly.

Don't be affarid to call your apache directly:
[www3 bin]# ./httpd -V
Server version: Apache/2.4.27 (Unix)
Server built:   Sep 30 2017 13:13:14
Server's Module Magic Number: 20120211:68
Server loaded:  APR 1.6.3, APR-UTIL 1.6.1
Compiled using: APR 1.6.2, APR-UTIL 1.6.0
Architecture:   64-bit
Server MPM: prefork
  threaded: no
forked: yes (variable process count)
Server compiled with
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
[www3 bin]# ./httpd -l
Compiled in modules:
  core.c
  mod_so.c
  http_core.c
  prefork.c

./httpd -t


You also need to find your log files and tail them

tail -f /usr/local/apache/logs/*

On top of that, FWIW, virtual hosts are very dependent on fuinctioning
DNS, and your DNS is being setup dynamically with dynamicdns etc.  That
has often been a source of trouble, to say the least.

Look, if it is real trouble, you can call me if you want on Sunday.

Ruben
-- 
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013

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

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



Re: [users@httpd] virtual host

2018-09-28 Thread Ruben Safir
On 9/28/18 7:10 AM, Carmel NY wrote:
> Okay, on a stock FreeBSD installation, maybe on others too, there is an
> index.html file in the document root that displays,


In my experience you can't expect a stock instllation to work,
especially since you seem to be pointing at different directories that
the stock installation.  The biary might be find but you need to make
sure your set up conforms to the expectations of the binary or that your
apachectl is called correctly.

Don't be affarid to call your apache directly:
[www3 bin]# ./httpd -V
Server version: Apache/2.4.27 (Unix)
Server built:   Sep 30 2017 13:13:14
Server's Module Magic Number: 20120211:68
Server loaded:  APR 1.6.3, APR-UTIL 1.6.1
Compiled using: APR 1.6.2, APR-UTIL 1.6.0
Architecture:   64-bit
Server MPM: prefork
  threaded: no
forked: yes (variable process count)
Server compiled with
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
[www3 bin]# ./httpd -l
Compiled in modules:
  core.c
  mod_so.c
  http_core.c
  prefork.c

./httpd -t


You also need to find your log files and tail them

tail -f /usr/local/apache/logs/*

On top of that, FWIW, virtual hosts are very dependent on fuinctioning
DNS, and your DNS is being setup dynamically with dynamicdns etc.  That
has often been a source of trouble, to say the least.

Ruben
-- 
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013

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



Re: [users@httpd] virtual host

2018-09-28 Thread Ruben Safir
On 9/28/18 5:21 AM, Sander Smeenk wrote:
> Quoting Carmel NY (carmel...@outlook.com):
>> This is my first attempt to set up a virtual host with apache24 on a
>> FreeBSD 11.2 machine, and it is not working out so well.
> 
> Please elaborate on the 'not working out so well' bit.
> 
> 
>> Assuming a site name of example.net, I tried to configure a simple vhost.
>> 
>> ServerAdmin webmas...@example.net
>> DocumentRoot "/usr/local/www/testdir"
>> ServerName stem.example.net:80
> 
> The port addition here is not needed and might interfere with your
> configuration.
> 
> 
>> ServerAlias www.stem.example.net
>> ErrorLog "/var/log/stem.error.log"
>> CustomLog "/var/log/stem.access.log" common
>>
>> AcceptPathInfo On
>>
>>   
>> AllowOverride all
>> Order Allow,Deny
>> Allow from all
>> # For Apache 2.4 add:
>> Require all granted
> 
> Remove the 'Order' and 'Allow' lines if you're running Apache 2.4
> Leave the 'Require all granted' line in that case.
> 
> 
>>   
>> 
> 
> Otherwise this vhost config looks just dandy!
> 
> 
>> apachectl -S
>> VirtualHost configuration:
>> *:80   stem.example.net 
>> (/usr/local/etc/apache24/extra/httpd-vhosts.conf:24)
>> *:443  example.net 
>> (/usr/local/etc/apache24/extra/httpd-ssl.conf:121)
> 
> It shows up here on port 80 too!
> 
> 
>> Obviously, I am dong something wrong, but I have no idea what.
> 
> Please tell us what is not working for you!
> 
> 
> Regards,
> -Sndr.
> 


I think it is not reading from his specified directories which are
/usr/local/www

Sounds like hist apachectl is not reading the config file.

-- 
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013

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



Re: [users@httpd] virtual host

2018-09-28 Thread Sander Smeenk
Quoting Carmel NY (carmel...@outlook.com):

> >Please elaborate on the 'not working out so well' bit.

> >> apachectl -S
> >> VirtualHost configuration:
> >> *:80   stem.example.net 
> >> (/usr/local/etc/apache24/extra/httpd-vhosts.conf:24)
> >> *:443  example.net 
> >> (/usr/local/etc/apache24/extra/httpd-ssl.conf:121)  

> Okay, on a stock FreeBSD installation, maybe on others too, there is an
> index.html file in the document root that displays, "It Works" when it is
> access. Now, when I type in my normal web address; http://example.net, the
> vhost site is displayed. However, if I type in the vhost name;
> http://stem.example.net, the regular site is display; ie. "It Works". That
> is exactly opposite of what it is supposed to be doing. That make no sense,
> so I know that I am doing something really wrong.

This is Apache 2.4.x ?

I don't see the 'default server ...','ip.add.re.ss:port is a NameVirtualHost'
and 'alias'-lines in your 'apache2ctl -S' output.

Did you remove those yourself?  It always helps not to obfuscate your configs
and logs when seeking help.

# apache2ctl -S
VirtualHost configuration:
213.154.236.176:443is a NameVirtualHost
   default server www.freshdot.net 
(/etc/apache2/sites-enabled/01.www.freshdot.net.conf:1)
   port 443 namevhost www.freshdot.net 
(/etc/apache2/sites-enabled/01.www.freshdot.net.conf:1)
  alias freshdot.net
 [ .. ]
[2001:7b8:633:1:213:154:236:176]:443 is a NameVirtualHost
   default server www.freshdot.net 
(/etc/apache2/sites-enabled/01.www.freshdot.net.conf:1)
   port 443 namevhost www.freshdot.net 
(/etc/apache2/sites-enabled/01.www.freshdot.net.conf:1)
  alias freshdot.net

Apache will, by default, treat the first vhost definition it finds as
the default vhost for that IP/port combo. Try defining a simple vhost
before defining the stem.example.net vhost so that no longer is your
default vhost.

Regards,
-Sndr.
-- 
| Scenery is here, wish you were beautiful.
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7  FBD6 F3A9 9442 20CC 6CD2

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



Re: [users@httpd] virtual host

2018-09-28 Thread Jonathon Koyle
Oh, I missed that my first time through.  Is there anything in the log
files that you specify in the virtual host?

On Fri, Sep 28, 2018, 05:51 Carmel NY  wrote:

> On Fri, 28 Sep 2018 05:32:16 -0600, Jonathon Koyle stated:
>
> >On Fri, Sep 28, 2018, 05:10 Carmel NY  wrote:
> >
> >> On Fri, 28 Sep 2018 11:21:36 +0200, Sander Smeenk stated:
> >>
> >> >Quoting Carmel NY (carmel...@outlook.com):
> >> >> This is my first attempt to set up a virtual host with apache24 on a
> >> >> FreeBSD 11.2 machine, and it is not working out so well.
> >> >
> >> >Please elaborate on the 'not working out so well' bit.
> >> >
> >> >
> >> >> Assuming a site name of example.net, I tried to configure a simple
> >> vhost.
> >> >> 
> >> >> ServerAdmin webmas...@example.net
> >> >> DocumentRoot "/usr/local/www/testdir"
> >> >> ServerName stem.example.net:80
> >> >
> >> >The port addition here is not needed and might interfere with your
> >> >configuration.
> >> >
> >> >
> >> >> ServerAlias www.stem.example.net
> >> >> ErrorLog "/var/log/stem.error.log"
> >> >> CustomLog "/var/log/stem.access.log" common
> >> >>
> >> >> AcceptPathInfo On
> >> >>
> >> >>   
> >> >> AllowOverride all
> >> >> Order Allow,Deny
> >> >> Allow from all
> >> >> # For Apache 2.4 add:
> >> >> Require all granted
> >> >
> >> >Remove the 'Order' and 'Allow' lines if you're running Apache 2.4
> >> >Leave the 'Require all granted' line in that case.
> >> >
> >> >
> >> >>   
> >> >> 
> >> >
> >> >Otherwise this vhost config looks just dandy!
> >> >
> >> >
> >> >> apachectl -S
> >> >> VirtualHost configuration:
> >> >> *:80   stem.example.net
> >> >> (/usr/local/etc/apache24/extra/httpd-vhosts.conf:24)
> >> >> *:443  example.net
> >> >> (/usr/local/etc/apache24/extra/httpd-ssl.conf:121)
> >> >
> >> >It shows up here on port 80 too!
> >> >
> >> >
> >> >> Obviously, I am dong something wrong, but I have no idea what.
> >> >
> >> >Please tell us what is not working for you!
> >>
> >> Okay, on a stock FreeBSD installation, maybe on others too, there is an
> >> index.html file in the document root that displays, "It Works" when it
> is
> >> access. Now, when I type in my normal web address; http://example.net,
> the
> >> vhost site is displayed. However, if I type in the vhost name;
> >> http://stem.example.net, the regular site is display; ie. "It Works".
> That
> >> is exactly opposite of what it is supposed to be doing. That make no
> sense,
> >> so I know that I am doing something really wrong.
> >>
> >> My dns is handled by . This is an export of the settings:
> >>
> >> $ORIGIN .
> >> $TTL 86400
> >> example.net IN SOA ns1153.dns.dyn.com. zone-admin.dyndns.com. (
> >>  2018092719 ; serial number
> >>  10800 ; refresh
> >>  1800 ; update retry
> >>  604800 ; expire
> >>  1800 ; minimum
> >>  )
> >>  NS ns1153.dns.dyn.com.
> >>  NS ns2173.dns.dyn.com.
> >>  NS ns3176.dns.dyn.com.
> >>  NS ns4139.dns.dyn.com.
> >>
> >> google._domainkey.example.net. 600 IN TXT "v=DKIM1\; k=rsa\;
> >>
> p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvIiRSLU6aPFuQ9vNjioVMLbJfHayAL9DNByMtJV3dKy0nckOMa0mhDEbnTg7/SNVwmgI8Wb0PY2FFsu2pGLJNFflOeSxV1w8Fs3JHbqhRmdH4da8Kzpwg17+ZwjHX1/0nELEkrNqKwa1Htj3apzbEJETCa7+Qp2qXxE84d3ZZmwIDAQAB"
> >> scorpio.example.net. 600 IN A 174.109.224.43
> >> example.net. 600 IN A 174.109.224.43
> >> example.net. 600 IN TXT "v=spf1 include:_spf.google.com ~all"
> >> example.net. 86400 IN MX 1 aspmx.l.google.com.
> >> example.net. 86400 IN MX 10 alt3.aspmx.l.google.com.
> >> example.net. 86400 IN MX 10 alt4.aspmx.l.google.com.
> >> example.net. 86400 IN MX 5 alt1.aspmx.l.google.com.
> >> example.net. 86400 IN MX 5 alt2.aspmx.l.google.com.
> >> stem.example.net. 600 IN A 174.109.224.43
> >> www.scorpio.example.net. 600 IN CNAME scorpio.example.net.
> >> www.example.net. 600 IN CNAME example.net.
> >> www.stem.example.net. 600 IN CNAME stem.example.net.
> >>
> >I wonder if the :80 in the ServerName directive is causing you grief,
> since
> >it isn't passed that way for http?
>
> I doubt it. As suggested earlier, I removed it from the configuration.
>
> --
> Carmel
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] virtual host

2018-09-28 Thread Carmel NY
On Fri, 28 Sep 2018 05:32:16 -0600, Jonathon Koyle stated:

>On Fri, Sep 28, 2018, 05:10 Carmel NY  wrote:
>
>> On Fri, 28 Sep 2018 11:21:36 +0200, Sander Smeenk stated:
>>
>> >Quoting Carmel NY (carmel...@outlook.com):
>> >> This is my first attempt to set up a virtual host with apache24 on a
>> >> FreeBSD 11.2 machine, and it is not working out so well.
>> >
>> >Please elaborate on the 'not working out so well' bit.
>> >
>> >
>> >> Assuming a site name of example.net, I tried to configure a simple
>> vhost.
>> >> 
>> >> ServerAdmin webmas...@example.net
>> >> DocumentRoot "/usr/local/www/testdir"
>> >> ServerName stem.example.net:80
>> >
>> >The port addition here is not needed and might interfere with your
>> >configuration.
>> >
>> >
>> >> ServerAlias www.stem.example.net
>> >> ErrorLog "/var/log/stem.error.log"
>> >> CustomLog "/var/log/stem.access.log" common
>> >>
>> >> AcceptPathInfo On
>> >>
>> >>   
>> >> AllowOverride all
>> >> Order Allow,Deny
>> >> Allow from all
>> >> # For Apache 2.4 add:
>> >> Require all granted
>> >
>> >Remove the 'Order' and 'Allow' lines if you're running Apache 2.4
>> >Leave the 'Require all granted' line in that case.
>> >
>> >
>> >>   
>> >> 
>> >
>> >Otherwise this vhost config looks just dandy!
>> >
>> >
>> >> apachectl -S
>> >> VirtualHost configuration:
>> >> *:80   stem.example.net
>> >> (/usr/local/etc/apache24/extra/httpd-vhosts.conf:24)
>> >> *:443  example.net
>> >> (/usr/local/etc/apache24/extra/httpd-ssl.conf:121)
>> >
>> >It shows up here on port 80 too!
>> >
>> >
>> >> Obviously, I am dong something wrong, but I have no idea what.
>> >
>> >Please tell us what is not working for you!
>>
>> Okay, on a stock FreeBSD installation, maybe on others too, there is an
>> index.html file in the document root that displays, "It Works" when it is
>> access. Now, when I type in my normal web address; http://example.net, the
>> vhost site is displayed. However, if I type in the vhost name;
>> http://stem.example.net, the regular site is display; ie. "It Works". That
>> is exactly opposite of what it is supposed to be doing. That make no sense,
>> so I know that I am doing something really wrong.
>>
>> My dns is handled by . This is an export of the settings:
>>
>> $ORIGIN .
>> $TTL 86400
>> example.net IN SOA ns1153.dns.dyn.com. zone-admin.dyndns.com. (
>>  2018092719 ; serial number
>>  10800 ; refresh
>>  1800 ; update retry
>>  604800 ; expire
>>  1800 ; minimum
>>  )
>>  NS ns1153.dns.dyn.com.
>>  NS ns2173.dns.dyn.com.
>>  NS ns3176.dns.dyn.com.
>>  NS ns4139.dns.dyn.com.
>>
>> google._domainkey.example.net. 600 IN TXT "v=DKIM1\; k=rsa\;
>> p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvIiRSLU6aPFuQ9vNjioVMLbJfHayAL9DNByMtJV3dKy0nckOMa0mhDEbnTg7/SNVwmgI8Wb0PY2FFsu2pGLJNFflOeSxV1w8Fs3JHbqhRmdH4da8Kzpwg17+ZwjHX1/0nELEkrNqKwa1Htj3apzbEJETCa7+Qp2qXxE84d3ZZmwIDAQAB"
>> scorpio.example.net. 600 IN A 174.109.224.43
>> example.net. 600 IN A 174.109.224.43
>> example.net. 600 IN TXT "v=spf1 include:_spf.google.com ~all"
>> example.net. 86400 IN MX 1 aspmx.l.google.com.
>> example.net. 86400 IN MX 10 alt3.aspmx.l.google.com.
>> example.net. 86400 IN MX 10 alt4.aspmx.l.google.com.
>> example.net. 86400 IN MX 5 alt1.aspmx.l.google.com.
>> example.net. 86400 IN MX 5 alt2.aspmx.l.google.com.
>> stem.example.net. 600 IN A 174.109.224.43
>> www.scorpio.example.net. 600 IN CNAME scorpio.example.net.
>> www.example.net. 600 IN CNAME example.net.
>> www.stem.example.net. 600 IN CNAME stem.example.net.
>>
>I wonder if the :80 in the ServerName directive is causing you grief, since
>it isn't passed that way for http?

I doubt it. As suggested earlier, I removed it from the configuration.

-- 
Carmel


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



Re: [users@httpd] virtual host

2018-09-28 Thread Jonathon Koyle
I wonder if the :80 in the ServerName directive is causing you grief, since
it isn't passed that way for http?

On Fri, Sep 28, 2018, 05:10 Carmel NY  wrote:

> On Fri, 28 Sep 2018 11:21:36 +0200, Sander Smeenk stated:
>
> >Quoting Carmel NY (carmel...@outlook.com):
> >> This is my first attempt to set up a virtual host with apache24 on a
> >> FreeBSD 11.2 machine, and it is not working out so well.
> >
> >Please elaborate on the 'not working out so well' bit.
> >
> >
> >> Assuming a site name of example.net, I tried to configure a simple
> vhost.
> >> 
> >> ServerAdmin webmas...@example.net
> >> DocumentRoot "/usr/local/www/testdir"
> >> ServerName stem.example.net:80
> >
> >The port addition here is not needed and might interfere with your
> >configuration.
> >
> >
> >> ServerAlias www.stem.example.net
> >> ErrorLog "/var/log/stem.error.log"
> >> CustomLog "/var/log/stem.access.log" common
> >>
> >> AcceptPathInfo On
> >>
> >>   
> >> AllowOverride all
> >> Order Allow,Deny
> >> Allow from all
> >> # For Apache 2.4 add:
> >> Require all granted
> >
> >Remove the 'Order' and 'Allow' lines if you're running Apache 2.4
> >Leave the 'Require all granted' line in that case.
> >
> >
> >>   
> >> 
> >
> >Otherwise this vhost config looks just dandy!
> >
> >
> >> apachectl -S
> >> VirtualHost configuration:
> >> *:80   stem.example.net
> >> (/usr/local/etc/apache24/extra/httpd-vhosts.conf:24)
> >> *:443  example.net
> >> (/usr/local/etc/apache24/extra/httpd-ssl.conf:121)
> >
> >It shows up here on port 80 too!
> >
> >
> >> Obviously, I am dong something wrong, but I have no idea what.
> >
> >Please tell us what is not working for you!
>
> Okay, on a stock FreeBSD installation, maybe on others too, there is an
> index.html file in the document root that displays, "It Works" when it is
> access. Now, when I type in my normal web address; http://example.net, the
> vhost site is displayed. However, if I type in the vhost name;
> http://stem.example.net, the regular site is display; ie. "It Works". That
> is exactly opposite of what it is supposed to be doing. That make no sense,
> so I know that I am doing something really wrong.
>
> My dns is handled by . This is an export of the settings:
>
> $ORIGIN .
> $TTL 86400
> example.net IN SOA ns1153.dns.dyn.com. zone-admin.dyndns.com. (
>  2018092719 ; serial number
>  10800 ; refresh
>  1800 ; update retry
>  604800 ; expire
>  1800 ; minimum
>  )
>  NS ns1153.dns.dyn.com.
>  NS ns2173.dns.dyn.com.
>  NS ns3176.dns.dyn.com.
>  NS ns4139.dns.dyn.com.
>
> google._domainkey.example.net. 600 IN TXT "v=DKIM1\; k=rsa\;
> p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvIiRSLU6aPFuQ9vNjioVMLbJfHayAL9DNByMtJV3dKy0nckOMa0mhDEbnTg7/SNVwmgI8Wb0PY2FFsu2pGLJNFflOeSxV1w8Fs3JHbqhRmdH4da8Kzpwg17+ZwjHX1/0nELEkrNqKwa1Htj3apzbEJETCa7+Qp2qXxE84d3ZZmwIDAQAB"
> scorpio.example.net. 600 IN A 174.109.224.43
> example.net. 600 IN A 174.109.224.43
> example.net. 600 IN TXT "v=spf1 include:_spf.google.com ~all"
> example.net. 86400 IN MX 1 aspmx.l.google.com.
> example.net. 86400 IN MX 10 alt3.aspmx.l.google.com.
> example.net. 86400 IN MX 10 alt4.aspmx.l.google.com.
> example.net. 86400 IN MX 5 alt1.aspmx.l.google.com.
> example.net. 86400 IN MX 5 alt2.aspmx.l.google.com.
> stem.example.net. 600 IN A 174.109.224.43
> www.scorpio.example.net. 600 IN CNAME scorpio.example.net.
> www.example.net. 600 IN CNAME example.net.
> www.stem.example.net. 600 IN CNAME stem.example.net.
>
> --
> Carmel
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] virtual host

2018-09-28 Thread Carmel NY
On Fri, 28 Sep 2018 11:21:36 +0200, Sander Smeenk stated:

>Quoting Carmel NY (carmel...@outlook.com):
>> This is my first attempt to set up a virtual host with apache24 on a
>> FreeBSD 11.2 machine, and it is not working out so well.  
>
>Please elaborate on the 'not working out so well' bit.
>
>
>> Assuming a site name of example.net, I tried to configure a simple vhost.
>> 
>> ServerAdmin webmas...@example.net
>> DocumentRoot "/usr/local/www/testdir"
>> ServerName stem.example.net:80  
>
>The port addition here is not needed and might interfere with your
>configuration.
>
>
>> ServerAlias www.stem.example.net
>> ErrorLog "/var/log/stem.error.log"
>> CustomLog "/var/log/stem.access.log" common
>> 
>> AcceptPathInfo On
>> 
>>   
>> AllowOverride all
>> Order Allow,Deny
>> Allow from all
>> # For Apache 2.4 add:
>> Require all granted  
>
>Remove the 'Order' and 'Allow' lines if you're running Apache 2.4
>Leave the 'Require all granted' line in that case.
>
>
>>   
>>   
>
>Otherwise this vhost config looks just dandy!
>
>
>> apachectl -S
>> VirtualHost configuration:
>> *:80   stem.example.net
>> (/usr/local/etc/apache24/extra/httpd-vhosts.conf:24)
>> *:443  example.net
>> (/usr/local/etc/apache24/extra/httpd-ssl.conf:121)  
>
>It shows up here on port 80 too!
>
>
>> Obviously, I am dong something wrong, but I have no idea what.  
>
>Please tell us what is not working for you!

Okay, on a stock FreeBSD installation, maybe on others too, there is an
index.html file in the document root that displays, "It Works" when it is
access. Now, when I type in my normal web address; http://example.net, the
vhost site is displayed. However, if I type in the vhost name;
http://stem.example.net, the regular site is display; ie. "It Works". That
is exactly opposite of what it is supposed to be doing. That make no sense,
so I know that I am doing something really wrong.

My dns is handled by . This is an export of the settings:

$ORIGIN .
$TTL 86400
example.net IN SOA ns1153.dns.dyn.com. zone-admin.dyndns.com. (
 2018092719 ; serial number
 10800 ; refresh
 1800 ; update retry
 604800 ; expire
 1800 ; minimum
 )
 NS ns1153.dns.dyn.com.
 NS ns2173.dns.dyn.com.
 NS ns3176.dns.dyn.com.
 NS ns4139.dns.dyn.com.

google._domainkey.example.net. 600 IN TXT "v=DKIM1\; k=rsa\; 
p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvIiRSLU6aPFuQ9vNjioVMLbJfHayAL9DNByMtJV3dKy0nckOMa0mhDEbnTg7/SNVwmgI8Wb0PY2FFsu2pGLJNFflOeSxV1w8Fs3JHbqhRmdH4da8Kzpwg17+ZwjHX1/0nELEkrNqKwa1Htj3apzbEJETCa7+Qp2qXxE84d3ZZmwIDAQAB"
scorpio.example.net. 600 IN A 174.109.224.43
example.net. 600 IN A 174.109.224.43
example.net. 600 IN TXT "v=spf1 include:_spf.google.com ~all"
example.net. 86400 IN MX 1 aspmx.l.google.com.
example.net. 86400 IN MX 10 alt3.aspmx.l.google.com.
example.net. 86400 IN MX 10 alt4.aspmx.l.google.com.
example.net. 86400 IN MX 5 alt1.aspmx.l.google.com.
example.net. 86400 IN MX 5 alt2.aspmx.l.google.com.
stem.example.net. 600 IN A 174.109.224.43
www.scorpio.example.net. 600 IN CNAME scorpio.example.net.
www.example.net. 600 IN CNAME example.net.
www.stem.example.net. 600 IN CNAME stem.example.net.

-- 
Carmel


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



Re: [users@httpd] virtual host

2018-09-28 Thread Sander Smeenk
Quoting Carmel NY (carmel...@outlook.com):
> This is my first attempt to set up a virtual host with apache24 on a
> FreeBSD 11.2 machine, and it is not working out so well.

Please elaborate on the 'not working out so well' bit.


> Assuming a site name of example.net, I tried to configure a simple vhost.
> 
> ServerAdmin webmas...@example.net
> DocumentRoot "/usr/local/www/testdir"
> ServerName stem.example.net:80

The port addition here is not needed and might interfere with your
configuration.


> ServerAlias www.stem.example.net
> ErrorLog "/var/log/stem.error.log"
> CustomLog "/var/log/stem.access.log" common
> 
> AcceptPathInfo On
> 
>   
> AllowOverride all
> Order Allow,Deny
> Allow from all
> # For Apache 2.4 add:
> Require all granted

Remove the 'Order' and 'Allow' lines if you're running Apache 2.4
Leave the 'Require all granted' line in that case.


>   
> 

Otherwise this vhost config looks just dandy!


> apachectl -S
> VirtualHost configuration:
> *:80   stem.example.net 
> (/usr/local/etc/apache24/extra/httpd-vhosts.conf:24)
> *:443  example.net 
> (/usr/local/etc/apache24/extra/httpd-ssl.conf:121)

It shows up here on port 80 too!


> Obviously, I am dong something wrong, but I have no idea what.

Please tell us what is not working for you!


Regards,
-Sndr.
-- 
| Why won't an answering machine ever answer any questions?
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7  FBD6 F3A9 9442 20CC 6CD2

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



Re: [users@httpd] virtual host gives unexpected network read error

2018-01-31 Thread Luca Toscano
Hi David,

2018-01-29 19:45 GMT-08:00 David Mehler :

> Hello,
>
> Can someone take a look at the below virtual host configuration?
> Whenever I put it in my apache 2.4 the server returns an alert
> unexpected network read error connection aborted message. If I take it
> out the server behaves normally. Of course nothing is in any of the
> logs I've got LogLevel set to warn. An apachectl -t says the files are
> syntactically correct.
>
> Any ideas?
>
> Thanks.
> Dave.
>
> #
> # Virtual host file
> #
>
> # The example.com http  and https virtual host
> 
>
> SSLCertificateFile "/usr/local/etc/ssl/acme/example.com/fullchain.pem"
> SSLCertificateKeyFile "/usr/local/etc/ssl/acme/private/
> example.com/privkey.pem"
> SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:ECDHE-
> RSA-AES128-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-
> RSA-AES128-GCM-SHA128:DHE-RSA-AES128-GCM-SHA384:DHE-RSA-
> AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA128:ECDHE-RSA-
> AES128-SHA384:ECDHE-RSA-AES128-SHA128:ECDHE-RSA-
> AES128-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA128:DHE-
> RSA-AES128-SHA128:DHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA:
> ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-
> SHA384:AES128-GCM-SHA128:AES128-SHA128:AES128-SHA128:
> AES128-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!
> EXPORT:!DES:!MD5:!PSK:!RC4:!3DES
> SSLEngine on
>
>
In this way you are enabling SSL/TLS on both 80 and 443 port, I don't
believe that it will work (even if I didn't test it properly). Any reason
why you have this settings? Can you try without the "*:80" ? In your case
I'd simply create a *:80 Vhost to force a http->https redirect, and then
apply SSL/etc.. settings only to *:443.

Luca


Re: [users@httpd] virtual host double slash effect, need solution

2017-07-16 Thread David Mehler
Hello,

Thanks. That sure made my file easier to handle.

One thing can I using redirect go from http to https? Like example.com
redirects to https://www.example.com?

Thanks.
Dave.


On 7/16/17, Daniel  wrote:
> Redirect is simpler as you can see, it redirects everything, it has a
> regex version called RedirectMatch. Both are provided by mod_alias.
>
> RewriteRule is for more complex things, yes it can redirect too, but
> as you have seen yourself, the most simple thing can bring confusion.
> RewriteRute is provided by mod_rewrite and should be used only when
> there is no simpler option for the sake of simplicity.
>
> The rule of thumb is to go for simpler configuration directives
> whenever possible, and a simple redirection like that in virtualhost
> is a task perfect for Redirect.
>
> 2017-07-16 19:14 GMT+02:00 David Mehler :
>> Hello,
>>
>> Thanks. I'll try the rewrite redirect.
>>
>> With regards the redirect option, the simpler way, does it do the tls
>> conversion unsecure to secure? What would the advantages/disadvantages
>> of rewrite and redirect?
>>
>> Thanks.
>> Dave.
>>
>>
>> On 7/16/17, Daniel  wrote:
>>> And while at it why not use simple Redirect's since your config fits
>>> perfectly to use them:
>>>
>>> 
>>> ServerName example.com
>>> Redirect / http://www.example.com/
>>> 
>>>
>>> simpler, gets the job done, and you don't need a cannon to smash a fly.
>>>
>>>
>>> 2017-07-16 17:48 GMT+02:00 Luca Toscano :
 Hi David,

 2017-07-15 3:11 GMT+02:00 David Mehler :
>
> Hello,
>
> I'm running Apache 2.4 on a FreeBSD 10.3 system, with several virtual
> hosts. My goal is to have all of them completely ssl, except for the
> .well-known area needed for letsencrypt.
>
> 
> ServerName example.com
> RewriteEngine On
> RewriteRule ^/?(.*) http://www.example.com$1 [R,L]
> # This line also produces the double slash effect
> # RewriteRule ^/?(.*) http://www.example.com/$1 [R,L]
> 
>

 Have you tried with RewriteRule ^(.*)$ https://www.example.com$1
 [R=301,L]
 ?
 (note also the https, IIUC you need to force TLS).

 Hope that helps,

 Luca

>>>
>>>
>>>
>>> --
>>> Daniel Ferradal
>>> IT Specialist
>>>
>>> email dferradal at gmail.com
>>> linkedin es.linkedin.com/in/danielferradal
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>>> For additional commands, e-mail: users-h...@httpd.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>> For additional commands, e-mail: users-h...@httpd.apache.org
>>
>
>
>
> --
> Daniel Ferradal
> IT Specialist
>
> email dferradal at gmail.com
> linkedin es.linkedin.com/in/danielferradal
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

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



Re: [users@httpd] virtual host double slash effect, need solution

2017-07-16 Thread Daniel
Redirect is simpler as you can see, it redirects everything, it has a
regex version called RedirectMatch. Both are provided by mod_alias.

RewriteRule is for more complex things, yes it can redirect too, but
as you have seen yourself, the most simple thing can bring confusion.
RewriteRute is provided by mod_rewrite and should be used only when
there is no simpler option for the sake of simplicity.

The rule of thumb is to go for simpler configuration directives
whenever possible, and a simple redirection like that in virtualhost
is a task perfect for Redirect.

2017-07-16 19:14 GMT+02:00 David Mehler :
> Hello,
>
> Thanks. I'll try the rewrite redirect.
>
> With regards the redirect option, the simpler way, does it do the tls
> conversion unsecure to secure? What would the advantages/disadvantages
> of rewrite and redirect?
>
> Thanks.
> Dave.
>
>
> On 7/16/17, Daniel  wrote:
>> And while at it why not use simple Redirect's since your config fits
>> perfectly to use them:
>>
>> 
>> ServerName example.com
>> Redirect / http://www.example.com/
>> 
>>
>> simpler, gets the job done, and you don't need a cannon to smash a fly.
>>
>>
>> 2017-07-16 17:48 GMT+02:00 Luca Toscano :
>>> Hi David,
>>>
>>> 2017-07-15 3:11 GMT+02:00 David Mehler :

 Hello,

 I'm running Apache 2.4 on a FreeBSD 10.3 system, with several virtual
 hosts. My goal is to have all of them completely ssl, except for the
 .well-known area needed for letsencrypt.

 
 ServerName example.com
 RewriteEngine On
 RewriteRule ^/?(.*) http://www.example.com$1 [R,L]
 # This line also produces the double slash effect
 # RewriteRule ^/?(.*) http://www.example.com/$1 [R,L]
 

>>>
>>> Have you tried with RewriteRule ^(.*)$ https://www.example.com$1 [R=301,L]
>>> ?
>>> (note also the https, IIUC you need to force TLS).
>>>
>>> Hope that helps,
>>>
>>> Luca
>>>
>>
>>
>>
>> --
>> Daniel Ferradal
>> IT Specialist
>>
>> email dferradal at gmail.com
>> linkedin es.linkedin.com/in/danielferradal
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>> For additional commands, e-mail: users-h...@httpd.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>



-- 
Daniel Ferradal
IT Specialist

email dferradal at gmail.com
linkedin es.linkedin.com/in/danielferradal

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



Re: [users@httpd] virtual host double slash effect, need solution

2017-07-16 Thread David Mehler
Hello,

Thanks. I'll try the rewrite redirect.

With regards the redirect option, the simpler way, does it do the tls
conversion unsecure to secure? What would the advantages/disadvantages
of rewrite and redirect?

Thanks.
Dave.


On 7/16/17, Daniel  wrote:
> And while at it why not use simple Redirect's since your config fits
> perfectly to use them:
>
> 
> ServerName example.com
> Redirect / http://www.example.com/
> 
>
> simpler, gets the job done, and you don't need a cannon to smash a fly.
>
>
> 2017-07-16 17:48 GMT+02:00 Luca Toscano :
>> Hi David,
>>
>> 2017-07-15 3:11 GMT+02:00 David Mehler :
>>>
>>> Hello,
>>>
>>> I'm running Apache 2.4 on a FreeBSD 10.3 system, with several virtual
>>> hosts. My goal is to have all of them completely ssl, except for the
>>> .well-known area needed for letsencrypt.
>>>
>>> 
>>> ServerName example.com
>>> RewriteEngine On
>>> RewriteRule ^/?(.*) http://www.example.com$1 [R,L]
>>> # This line also produces the double slash effect
>>> # RewriteRule ^/?(.*) http://www.example.com/$1 [R,L]
>>> 
>>>
>>
>> Have you tried with RewriteRule ^(.*)$ https://www.example.com$1 [R=301,L]
>> ?
>> (note also the https, IIUC you need to force TLS).
>>
>> Hope that helps,
>>
>> Luca
>>
>
>
>
> --
> Daniel Ferradal
> IT Specialist
>
> email dferradal at gmail.com
> linkedin es.linkedin.com/in/danielferradal
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

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



Re: [users@httpd] virtual host double slash effect, need solution

2017-07-16 Thread Daniel
And while at it why not use simple Redirect's since your config fits
perfectly to use them:


ServerName example.com
Redirect / http://www.example.com/


simpler, gets the job done, and you don't need a cannon to smash a fly.


2017-07-16 17:48 GMT+02:00 Luca Toscano :
> Hi David,
>
> 2017-07-15 3:11 GMT+02:00 David Mehler :
>>
>> Hello,
>>
>> I'm running Apache 2.4 on a FreeBSD 10.3 system, with several virtual
>> hosts. My goal is to have all of them completely ssl, except for the
>> .well-known area needed for letsencrypt.
>>
>> 
>> ServerName example.com
>> RewriteEngine On
>> RewriteRule ^/?(.*) http://www.example.com$1 [R,L]
>> # This line also produces the double slash effect
>> # RewriteRule ^/?(.*) http://www.example.com/$1 [R,L]
>> 
>>
>
> Have you tried with RewriteRule ^(.*)$ https://www.example.com$1 [R=301,L] ?
> (note also the https, IIUC you need to force TLS).
>
> Hope that helps,
>
> Luca
>



-- 
Daniel Ferradal
IT Specialist

email dferradal at gmail.com
linkedin es.linkedin.com/in/danielferradal

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



Re: [users@httpd] virtual host double slash effect, need solution

2017-07-16 Thread Luca Toscano
Hi David,

2017-07-15 3:11 GMT+02:00 David Mehler :

> Hello,
>
> I'm running Apache 2.4 on a FreeBSD 10.3 system, with several virtual
> hosts. My goal is to have all of them completely ssl, except for the
> .well-known area needed for letsencrypt.
>
> 
> ServerName example.com
> RewriteEngine On
> RewriteRule ^/?(.*) http://www.example.com$1 [R,L]
> # This line also produces the double slash effect
> # RewriteRule ^/?(.*) http://www.example.com/$1 [R,L]
> 
>
>
Have you tried with RewriteRule ^(.*)$ https://www.example.com$1 [R=301,L]
? (note also the https, IIUC you need to force TLS).

Hope that helps,

Luca


Re: [users@httpd] Virtual host config and non-virtual host directories

2017-03-15 Thread Robert Moskowitz
It seems that once you use virtual hosting, you really need to define a 
default virtual host by making something the first in the config file.


On a server without virtual hosts, I have:

VirtualHost configuration:
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex authdigest-client: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex default: dir="/run/httpd/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="apache" id=48
Group: name="apache" id=48

But the one with:

VirtualHost configuration:
*:443  is a NameVirtualHost
 default server webmail.test.htt-consult.com 
(/etc/httpd/conf.d/roundcubemail.conf:2)
 port 443 namevhost webmail.test.htt-consult.com 
(/etc/httpd/conf.d/roundcubemail.conf:2)

 alias webmail
 port 443 namevhost z9m9z.test.htt-consult.com 
(/etc/httpd/conf.d/ssl.conf:56)

ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/run/httpd/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
Mutex ssl-stapling: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="apache" id=48
Group: name="apache" id=48

So I have to work up a default virtual host to get access as I need it.

OK learned a little.

On 03/14/2017 11:16 PM, Robert Moskowitz wrote:

I am reading:

https://httpd.apache.org/docs/2.4/vhosts/examples.html

And the statement:

"The asterisks match all addresses, so the main server serves no 
requests. Due to the fact that the virtual host with |ServerName 
www.example.com| is first in the configuration file, it has the 
highest priority and can be seen as the default or primary server. 
That means that if a request is received that does not match one of 
the specified |ServerName 
| 
directives, it will be served by this first | 
|."


I read this that if I have a conf file that does not have virtual host 
directive, it basically fails?


If my first virtual host is:



#  Alias /roundcubemail /usr/share/roundcubemail
#  Alias /webmail /usr/share/roundcubemail

 ServerName webmail.$your_domain_tld
 ServerAlias webmail

 RewriteEngine On
 ReWriteCond %{HTTP_HOST} =webmail.$your_domain_tld [NC]
 RewriteCond %{SERVER_PORT} !=443
 RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
 ExpiresDefault "access plus 10 years"
 AddOutputFilterByType DEFLATE text/html text/plain text/xml
 php_admin_flag session.cookie_secure "1"



any config that does not use virtualhost (that is just an Alias and 
directory directive) first passes through this first virtual host.  
And the way to 'fix' this is to have a dummy first virtual directive:


/etc/httpd/conf.d/00-init.conf

ServerNamefoo.bar.com

?






Re: [users@httpd] Virtual Host - Port 80 to 443

2016-07-14 Thread Frank Gingras
No, you missed the trailing slash:

 Redirect permanent / https://subdomain.domain.ac.za/

On Thu, Jul 14, 2016 at 6:19 AM, Daniel <dferra...@gmail.com> wrote:

>
> -- Forwarded message --
> From: Daniel <dferra...@gmail.com>
> Date: 2016-07-14 12:18 GMT+02:00
> Subject: Re: [users@httpd] Virtual Host - Port 80 to 443
> To: Leon Vergottini <le...@cornerstone.ac.za>
>
>
> It seems correct.
>
> If you have several virtualhosts for different subdomains you should
> define them on the same fashion as what you just showed.. If this is Apache
> 2.2.x  and you have several virtualhosts not just 1 for 80 and 1 for 443,
> you should have NameVirtualHost *:80 and NameVirtualHost *:443 (if you are
> certainly using VirtualHost *:port in all cases.
>
> It really depends on what you want to do, but premise are:
> * VirtualHost should always have a port in it along with * or ip
> * Each virtualhost should have a servername specifying which host name it
> is supposed to serve.
> * To redirect to SSL a Redirect is enough in the non-SSL virtualhost. (no
> need for mod_rewrite).
> * 2.2.x requires namevirtualhost directive in order to not deliver all
> requests to first virtualhost that matches the ip:port combination.
>
> 2016-07-14 12:11 GMT+02:00 Leon Vergottini <le...@cornerstone.ac.za>:
>
>> Dear Daniel
>>
>>
>>
>> Thank you for the quick the reply. It is much appreciated.
>>
>>
>>
>> If I understand you correctly, then the example below should be correct
>> and will work for all the subdomains as well.
>>
>>
>>
>> 
>>
>> ServerName subdomain1.domain.ac.za
>>
>>
>>
>> Redirect permanent / https://subdomain.domain.ac.za
>>
>>
>>
>> 
>>
>>
>>
>> 
>>
>> ServerName subdomain1.domain.ac.za
>>
>>
>>
>> SSLEngine On
>>
>> SSLCertificateKeyFile /etc/pki/tls/certs/cnrstone/x.key
>>
>> SSLCertificateFile /etc/pki/tls/certs/cnrstone/ x.crt
>>
>>
>>
>> DocumentRoot "/var/www/subdomain.domain.ac.za/public_html"
>>
>> 
>>
>> Options Indexes FollowSymLinks MultiViews
>>
>>  # AllowOverride controls what directives may be placed in
>> .htaccess files.
>>
>> AllowOverride All
>>
>> # Controls who can get stuff from this server file
>>
>>             Order allow,deny
>>
>> Allow from all
>>
>>
>>
>> 
>>
>> ServerEnvironment apache apache
>>
>> 
>>
>> 
>>
>>
>>
>> Kind Regards
>>
>> Leon
>>
>>
>>
>> *From: *Daniel <dferra...@gmail.com>
>> *Reply-To: *<users@httpd.apache.org>
>> *Date: *Thursday, 14 July 2016 at 11:40 AM
>> *To: *"<users@httpd.apache.org>" <users@httpd.apache.org>
>> *Subject: *Re: [users@httpd] Virtual Host - Port 80 to 443
>>
>>
>>
>>   is totally invalid. Use *:80 or *:443 or ip:port but
>> never "*" alone.
>>
>>
>>
>> Also if you define *:80 and there you want to redirect to the SSL
>> virtualhost by all means use the http scheme in the redirect directive like:
>>
>> Redirect permanent / https://subdomain.domain.ac.za/
>>
>>
>>
>> 2016-07-14 11:31 GMT+02:00 Leon Vergottini <le...@cornerstone.ac.za>:
>>
>> Dear Community
>>
>>
>>
>> I hope you are doing well today.
>>
>>
>>
>> May I kindly ask your assistance since HTTPD is not my strong point?  I
>> have several virtual host conf files that have the structure below.  I am
>> now trying to change them so that incoming visitors from port 80 are being
>> redirected to port 443:
>>
>>
>>
>>
>>
>> 
>>
>> ServerName subdomain.domain.ac.za
>>
>> DocumentRoot "/var/www/ subdomain.domain.ac.za/public_html"
>>
>> > subdomain.domain.ac.za/public_html">
>>
>> Options Indexes FollowSymLinks MultiViews
>>
>>  # AllowOverride controls what directives may be placed in
>> .htaccess files.
>>
>> AllowOverride All
>>
>> # Controls who can get stuff from this server file
>&

Re: [users@httpd] Virtual Host - Port 80 to 443

2016-07-14 Thread Leon Vergottini
Dear Daniel

 

Thank you for the quick the reply. It is much appreciated.

 

If I understand you correctly, then the example below should be correct and 
will work for all the subdomains as well.

 



    ServerName subdomain1.domain.ac.za

 

    Redirect permanent / https://subdomain.domain.ac.za

 



 



    ServerName subdomain1.domain.ac.za

 

    SSLEngine On

    SSLCertificateKeyFile /etc/pki/tls/certs/cnrstone/x.key

    SSLCertificateFile /etc/pki/tls/certs/cnrstone/ x.crt

 

    DocumentRoot "/var/www/subdomain.domain.ac.za/public_html"

    

    Options Indexes FollowSymLinks MultiViews

 # AllowOverride controls what directives may be placed in .htaccess 
files.

    AllowOverride All

    # Controls who can get stuff from this server file

    Order allow,deny

    Allow from all

   

    

    ServerEnvironment apache apache

    



 

Kind Regards

Leon

 

From: Daniel <dferra...@gmail.com>
Reply-To: <users@httpd.apache.org>
Date: Thursday, 14 July 2016 at 11:40 AM
To: "<users@httpd.apache.org>" <users@httpd.apache.org>
Subject: Re: [users@httpd] Virtual Host - Port 80 to 443

 

  is totally invalid. Use *:80 or *:443 or ip:port but never "*" 
alone.

 

Also if you define *:80 and there you want to redirect to the SSL virtualhost 
by all means use the http scheme in the redirect directive like:

Redirect permanent / https://subdomain.domain.ac.za/

 

2016-07-14 11:31 GMT+02:00 Leon Vergottini <le...@cornerstone.ac.za>:

Dear Community

 

I hope you are doing well today.

 

May I kindly ask your assistance since HTTPD is not my strong point?  I have 
several virtual host conf files that have the structure below.  I am now trying 
to change them so that incoming visitors from port 80 are being redirected to 
port 443:

 

 



ServerName subdomain.domain.ac.za

DocumentRoot "/var/www/ subdomain.domain.ac.za/public_html"



Options Indexes FollowSymLinks MultiViews

 # AllowOverride controls what directives may be placed in 
.htaccess files.

AllowOverride All

# Controls who can get stuff from this server file

Order allow,deny

Allow from all

   



ServerEnvironment apache apache







If a change it to this structure below to redirect the traffic from port 80 
to 443, I am getting the error message that connection is not private and if I 
continue I am getting the default Apache page instead of the intended site’s 
home page.





ServerName subdomain.domain,ac,za



SSLEngine On

SSLCertificateKeyFile /etc/pki/tls/certs/cnrstone/xx.key

SSLCertificateFile /etc/pki/tls/certs/cnrstone/ xx.crt



RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://%{SERVER_NAME} [R,L]



DocumentRoot "/var/www/ subdomain.domain.ac.za/public_html"



Options Indexes FollowSymLinks MultiViews

 # AllowOverride controls what directives may be placed in 
.htaccess files.

AllowOverride All

# Controls who can get stuff from this server file

Order allow,deny

Allow from all

   



ServerEnvironment apache apache







If I change it to this structure below, the page is presented when using 
the url https://subdomain.domain.ac.za/ but not http://subdomain.domain.ac.za/





ServerName subdomain.domain.ac.za



SSLEngine On

SSLCertificateKeyFile /etc/pki/tls/certs/cnrstone/ xx.key

SSLCertificateFile /etc/pki/tls/certs/cnrstone/ xx.crt



DocumentRoot "/var/www/ subdomain.domain.ac.za/public_html"



Options Indexes FollowSymLinks MultiViews

 # AllowOverride controls what directives may be placed in 
.htaccess files.

AllowOverride All

# Controls who can get stuff from this server file

Order allow,deny

Allow from all

   



ServerEnvironment apache apache





 

Last virhost structure that I tried is similar to the one below.  When applying 
these changes to other virtual hosts files, I am not re-directed to the right 
site, i.e.  url https://subdom

Re: [users@httpd] Virtual Host - Port 80 to 443

2016-07-14 Thread Daniel
  is totally invalid. Use *:80 or *:443 or ip:port but never
"*" alone.

Also if you define *:80 and there you want to redirect to the SSL
virtualhost by all means use the http scheme in the redirect directive like:
Redirect permanent / https://subdomain.domain.ac.za/

2016-07-14 11:31 GMT+02:00 Leon Vergottini :

> Dear Community
>
>
>
> I hope you are doing well today.
>
>
>
> May I kindly ask your assistance since HTTPD is not my strong point?  I
> have several virtual host conf files that have the structure below.  I am
> now trying to change them so that incoming visitors from port 80 are being
> redirected to port 443:
>
>
>
>
>
> 
>
> ServerName subdomain.domain.ac.za
>
> DocumentRoot "/var/www/ subdomain.domain.ac.za/public_html"
>
>  subdomain.domain.ac.za/public_html">
>
> Options Indexes FollowSymLinks MultiViews
>
>  # AllowOverride controls what directives may be placed in
> .htaccess files.
>
> AllowOverride All
>
> # Controls who can get stuff from this server file
>
> Order allow,deny
>
> Allow from all
>
>
>
> 
>
> ServerEnvironment apache apache
>
> 
>
> 
>
>
>
> If a change it to this structure below to redirect the traffic from
> port 80 to 443, I am getting the error message that connection is not
> private and if I continue I am getting the default Apache page instead of
> the intended site’s home page.
>
>
>
> 
>
> ServerName subdomain.domain,ac,za
>
>
>
> SSLEngine On
>
> SSLCertificateKeyFile /etc/pki/tls/certs/cnrstone/xx.key
>
> SSLCertificateFile /etc/pki/tls/certs/cnrstone/ xx.crt
>
>
>
> RewriteEngine On
>
> RewriteCond %{HTTPS} off
>
> RewriteRule (.*) https://%{SERVER_NAME} [R,L]
>
>
>
> DocumentRoot "/var/www/ subdomain.domain.ac.za/public_html"
>
>  subdomain.domain.ac.za/public_html">
>
> Options Indexes FollowSymLinks MultiViews
>
>  # AllowOverride controls what directives may be placed in
> .htaccess files.
>
> AllowOverride All
>
> # Controls who can get stuff from this server file
>
> Order allow,deny
>
> Allow from all
>
>
>
> 
>
> ServerEnvironment apache apache
>
> 
>
> 
>
>
>
> If I change it to this structure below, the page is presented when
> using the url https://subdomain.domain.ac.za/ but not
> http://subdomain.domain.ac.za/
>
>
>
> 
>
> ServerName subdomain.domain.ac.za
>
>
>
> SSLEngine On
>
> SSLCertificateKeyFile /etc/pki/tls/certs/cnrstone/ xx.key
>
> SSLCertificateFile /etc/pki/tls/certs/cnrstone/ xx.crt
>
>
>
> DocumentRoot "/var/www/ subdomain.domain.ac.za/public_html"
>
>  subdomain.domain.ac.za/public_html">
>
> Options Indexes FollowSymLinks MultiViews
>
>  # AllowOverride controls what directives may be placed in
> .htaccess files.
>
> AllowOverride All
>
> # Controls who can get stuff from this server file
>
> Order allow,deny
>
> Allow from all
>
>
>
> 
>
> ServerEnvironment apache apache
>
> 
>
> 
>
>
>
> Last virhost structure that I tried is similar to the one below.  When
> applying these changes to other virtual hosts files, I am not re-directed
> to the right site, i.e.  url https://subdomain1.domain.ac.za gets
> redirected to https://subdomain.domain.ac.za.
>
>
>
> 
>
>ServerName subdomain.domain.ac.za
>
>DocumentRoot "/var/www/subdomain.cornerstone.ac.za/public_html"
>
>Redirect permanent / subdomain.domain.ac.za
>
> 
>
>
>
> 
>
>ServerName subdomain.domain.ac.za
>
>
>
> SSLEngine On
>
> SSLCertificateKeyFile /etc/pki/tls/certs/cnrstone/ xx.key
>
> SSLCertificateFile /etc/pki/tls/certs/cnrstone/ xx.crt
>
>
>
> DocumentRoot "/var/www/subdomain.domain.ac.za/public_html"
>
>  subdomain.domain.ac.za/public_html">
>
> Options Indexes FollowSymLinks MultiViews
>
>  # AllowOverride controls what directives may be placed in
> .htaccess files.
>
> AllowOverride All
>
> # Controls who can get stuff from this server file
>
> Order allow,deny
>
> Allow from all
>
>
>
> 
>
> ServerEnvironment apache apache
>
> 
>
>
>

Re: Fwd: Re: [users@httpd] Virtual Host Not working

2016-05-14 Thread Beech

On 05/14/16 18:19, Frank Gingras wrote:



On 14/05/16 07:53 PM, phil wrote:


On 15/05/2016 6:16 AM, Beech wrote:




 Forwarded Message 
Subject: Re: [users@httpd] Virtual Host Not working
Date: Sat, 14 May 2016 21:46:41 +0200
From: miguel gonzalez <miguel_3_gonza...@yahoo.es>
To: Beech <akbe...@gmail.com>, users@httpd.apache.org

I always have used either the ip address or the wildcard * in the
virtualhost directive.

Have you checked the logs?

Beech <akbe...@gmail.com> wrote:


I have added a new virtual domain and it's not working. No error
messages, just won't connect. I have triple checked the paths and
spelling. DNS is propagated and dig returns the correct IP.  The other
domains work. Here's the setting, it's Apache24:


ServerAdmin akbe...@gmail.com
DocumentRoot "/usr/local/www/fishing/htdocs"
ServerName www.greatlandfishing.com
ServerAlias www.greatlandfishing.com
ErrorLog "/usr/local/www/fishing/logs/greatlandfishing-error_log"
CustomLog "/usr/local/www/fishing/logs/greatlandfishing-access_log"
common
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps



Try changing the above line to:



reload apache, it might help . . .



Run apachectl -S, define all your vhosts as *:PORT, and show the output
from the apachectl -S command after your changes.

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



Thanks for your reply. I found the problem, it turned out to be DNS 
related Not Apache. I cleaned up the virtual config files and all is well.


Thanks,

Beech

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



Re: Fwd: Re: [users@httpd] Virtual Host Not working

2016-05-14 Thread Frank Gingras



On 14/05/16 07:53 PM, phil wrote:


On 15/05/2016 6:16 AM, Beech wrote:




 Forwarded Message 
Subject: Re: [users@httpd] Virtual Host Not working
Date: Sat, 14 May 2016 21:46:41 +0200
From: miguel gonzalez <miguel_3_gonza...@yahoo.es>
To: Beech <akbe...@gmail.com>, users@httpd.apache.org

I always have used either the ip address or the wildcard * in the
virtualhost directive.

Have you checked the logs?

Beech <akbe...@gmail.com> wrote:


I have added a new virtual domain and it's not working. No error
messages, just won't connect. I have triple checked the paths and
spelling. DNS is propagated and dig returns the correct IP.  The other
domains work. Here's the setting, it's Apache24:


ServerAdmin akbe...@gmail.com
DocumentRoot "/usr/local/www/fishing/htdocs"
ServerName www.greatlandfishing.com
ServerAlias www.greatlandfishing.com
ErrorLog "/usr/local/www/fishing/logs/greatlandfishing-error_log"
CustomLog "/usr/local/www/fishing/logs/greatlandfishing-access_log"
common
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps



Try changing the above line to:



reload apache, it might help . . .



Run apachectl -S, define all your vhosts as *:PORT, and show the output 
from the apachectl -S command after your changes.


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



Re: Fwd: Re: [users@httpd] Virtual Host Not working

2016-05-14 Thread phil


On 15/05/2016 6:16 AM, Beech wrote:




 Forwarded Message 
Subject: Re: [users@httpd] Virtual Host Not working
Date: Sat, 14 May 2016 21:46:41 +0200
From: miguel gonzalez <miguel_3_gonza...@yahoo.es>
To: Beech <akbe...@gmail.com>, users@httpd.apache.org

I always have used either the ip address or the wildcard * in the
virtualhost directive.

Have you checked the logs?

Beech <akbe...@gmail.com> wrote:


I have added a new virtual domain and it's not working. No error
messages, just won't connect. I have triple checked the paths and
spelling. DNS is propagated and dig returns the correct IP.  The other
domains work. Here's the setting, it's Apache24:


ServerAdmin akbe...@gmail.com
DocumentRoot "/usr/local/www/fishing/htdocs"
ServerName www.greatlandfishing.com
ServerAlias www.greatlandfishing.com
ErrorLog "/usr/local/www/fishing/logs/greatlandfishing-error_log"
CustomLog "/usr/local/www/fishing/logs/greatlandfishing-access_log"
common
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps



Try changing the above line to:



reload apache, it might help . . .

--
Regards
Phil


AllowOverride All
DirectoryIndex index.php index.html index.htm
Order Allow,Deny
Allow from All



Does anyone have a suggestion? The other vhosts have almost identical
configs and work.

Beech

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



I have checked the logs, nothing. I also changed the directive back to
*:80, no difference. I'm starting to think I have a dns problem on this
FreeBSD box. Thanks for the reply.

Beech


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



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



Fwd: Re: [users@httpd] Virtual Host Not working

2016-05-14 Thread Beech




 Forwarded Message 
Subject: Re: [users@httpd] Virtual Host Not working
Date: Sat, 14 May 2016 21:46:41 +0200
From: miguel gonzalez <miguel_3_gonza...@yahoo.es>
To: Beech <akbe...@gmail.com>, users@httpd.apache.org

I always have used either the ip address or the wildcard * in the 
virtualhost directive.


Have you checked the logs?

Beech <akbe...@gmail.com> wrote:


I have added a new virtual domain and it's not working. No error
messages, just won't connect. I have triple checked the paths and
spelling. DNS is propagated and dig returns the correct IP.  The other
domains work. Here's the setting, it's Apache24:


ServerAdmin akbe...@gmail.com
DocumentRoot "/usr/local/www/fishing/htdocs"
ServerName www.greatlandfishing.com
ServerAlias www.greatlandfishing.com
ErrorLog "/usr/local/www/fishing/logs/greatlandfishing-error_log"
CustomLog "/usr/local/www/fishing/logs/greatlandfishing-access_log"
common
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

AllowOverride All
DirectoryIndex index.php index.html index.htm
Order Allow,Deny
Allow from All



Does anyone have a suggestion? The other vhosts have almost identical
configs and work.

Beech

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



I have checked the logs, nothing. I also changed the directive back to 
*:80, no difference. I'm starting to think I have a dns problem on this 
FreeBSD box. Thanks for the reply.


Beech


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



Re: [users@httpd] Virtual Host Not working

2016-05-14 Thread miguel gonzalez
I always have used either the ip address or the wildcard * in the virtualhost 
directive.

Have you checked the logs?

Beech  wrote:

>I have added a new virtual domain and it's not working. No error 
>messages, just won't connect. I have triple checked the paths and 
>spelling. DNS is propagated and dig returns the correct IP.  The other 
>domains work. Here's the setting, it's Apache24:
>
>
> ServerAdmin akbe...@gmail.com
> DocumentRoot "/usr/local/www/fishing/htdocs"
> ServerName www.greatlandfishing.com
> ServerAlias www.greatlandfishing.com
> ErrorLog "/usr/local/www/fishing/logs/greatlandfishing-error_log"
> CustomLog "/usr/local/www/fishing/logs/greatlandfishing-access_log"
>common
> AddType application/x-httpd-php .php .phtml
> AddType application/x-httpd-php-source .phps
>
> AllowOverride All
> DirectoryIndex index.php index.html index.htm
> Order Allow,Deny
> Allow from All
>
>
>
>Does anyone have a suggestion? The other vhosts have almost identical 
>configs and work.
>
>Beech
>
>-
>To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>For additional commands, e-mail: users-h...@httpd.apache.org
>

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


Re: [users@httpd] Virtual Host Setup Help

2016-02-13 Thread Eric Covener
On Sat, Feb 13, 2016 at 6:43 AM, Meta Correio 
wrote:

> So, the question is, why does Apache place both requests under the same
> Virtual Host when, on a scenario using Virtual Hosts under the
> NameVirtualHost paradigm it should look at the Host: to decide what Virtual
> Host to use.
>

​There is an under-ocumented, less used/understood matching step for NVH
where the Host is compared to the address/hostname in the 
itself. This is what messes with your test using the IP address.



-- 
Eric Covener
cove...@gmail.com


Re: [users@httpd] virtual host configuration

2015-07-23 Thread ken

On 07/23/2015 03:48 PM, Mathijs Schmittmann wrote:

K R schreef op 7/23/2015 om 9:44 PM:

Hi,
my customer want to configure virtual host for 5 website in one apache
environment .  do i have to get 5 ip addresses from network team.

Can someone please point me on how can i achieve the same


No, you should create 5 virtualhosts in your configuration and let the
Apache HTTPD listen on 1 IP. Based on which website is requested
(technically based on the 'Host' header in the HTTP request) the httpd
will select the right DocumentRoot for serving a response.

For more information about virtualhosts:
http://wiki.apache.org/httpd/ExampleVhosts
http://httpd.apache.org/docs/current/vhosts/examples.html



Thanks in advance


Best regards,
Mathijs Schmittmann


This is called name-based virtual hosting if you want to run a web 
search for it.  That may yield some help for you also.




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



Re: [users@httpd] virtual host configuration

2015-07-23 Thread Mathijs Schmittmann
K R schreef op 7/23/2015 om 9:44 PM:
 Hi,
 my customer want to configure virtual host for 5 website in one apache
 environment .  do i have to get 5 ip addresses from network team.
 
 Can someone please point me on how can i achieve the same 

No, you should create 5 virtualhosts in your configuration and let the
Apache HTTPD listen on 1 IP. Based on which website is requested
(technically based on the 'Host' header in the HTTP request) the httpd
will select the right DocumentRoot for serving a response.

For more information about virtualhosts:
http://wiki.apache.org/httpd/ExampleVhosts
http://httpd.apache.org/docs/current/vhosts/examples.html

 
 Thanks in advance

Best regards,
Mathijs Schmittmann

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



Re: [users@httpd] Virtual Host Not Working

2014-02-12 Thread Tom Evans
On Mon, Feb 10, 2014 at 10:24 PM, Jim Borland jborl...@calpoly.edu wrote:
 My server, which is located in the Amazon cloud, was just moved to a new
 location with a new IP address.  Nothing else was changed. However, the
 Apache Virtual Host, which has worked flawlessly for several years, is
 broken.  Apache server version is: Apache/2.2.16 (Ubuntu).

 I went to my DNS host and changed the names to point to the new IP address.
 But now, when I go to the hostname in my browser I end up at the default
 site instead of the one specified for the virtual host.  Here is my config
 file (httpd-vhosts.conf).

 


Simplify your config:

 NameVirtualHost *:80

 VirtualHost *:80
 ServerAdmin jborlan...@gmail.com
 ServerName ec2-75-101-136-229.compute-1.amazonaws.com
 DocumentRoot /var/www
 /VirtualHost

 Directory /home/jim
Order allow,deny
Allow from all
 /Directory

 VirtualHost *:80
 ServerName atascaderoband.org
 ServerAlias www.atascaderoband.org
 DocumentRoot /home/jim/atasband
 /VirtualHost

 VirtualHost *:80
 ServerName www.slocountyband.org
 ServerAlias slocountyband.org
 DocumentRoot /home/jim/band
 /VirtualHost


Work now?

Cheers

Tom

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



Re: [users@httpd] Virtual Host Not Working

2014-02-12 Thread Jim Borland
My goodness, that worked!  I am blown away!  Thank you very much for 
your help with this.


Jim

On 2/12/2014 2:58 AM, Tom Evans wrote:

On Mon, Feb 10, 2014 at 10:24 PM, Jim Borland jborl...@calpoly.edu wrote:

My server, which is located in the Amazon cloud, was just moved to a new
location with a new IP address.  Nothing else was changed. However, the
Apache Virtual Host, which has worked flawlessly for several years, is
broken.  Apache server version is: Apache/2.2.16 (Ubuntu).

I went to my DNS host and changed the names to point to the new IP address.
But now, when I go to the hostname in my browser I end up at the default
site instead of the one specified for the virtual host.  Here is my config
file (httpd-vhosts.conf).




Simplify your config:


NameVirtualHost *:80

VirtualHost *:80
 ServerAdmin jborlan...@gmail.com
 ServerName ec2-75-101-136-229.compute-1.amazonaws.com
 DocumentRoot /var/www
/VirtualHost

Directory /home/jim
Order allow,deny
Allow from all
/Directory

VirtualHost *:80
 ServerName atascaderoband.org
 ServerAlias www.atascaderoband.org
 DocumentRoot /home/jim/atasband
/VirtualHost

VirtualHost *:80
 ServerName www.slocountyband.org
 ServerAlias slocountyband.org
 DocumentRoot /home/jim/band
/VirtualHost


Work now?

Cheers

Tom

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





Re: [users@httpd] Virtual host Alias

2014-01-23 Thread Chris Arnold

 On Jan 23, 2014, at 4:44 AM, Ole Kürstein okyrst...@gmail.com wrote:
 
 I have a problem. Dont know if it can be done.
 
 It is this i can't get working:  www.example.com/test
 
 can't get the /test working
 
 example--- 
 
 VirtualHost *:80
 ServerName www.example.com
 ServerAlias example.com 
 DocumentRoot /www/htdocs
 /VirtualHost
 
 
 VirtualHost *:80
 ServerName www.test.example.com
 ServerAlias test.example.com  example.com/test www.example.com/test
 DocumentRoot /www/htdocs/test
 /VirtualHost

If I understand your issue correctly, you will need to use either a rewrite or 
proxypass. Due to what you are trying to do, I suggest a rewrite:

http://httpd.apache.org/docs/current/mod/mod_rewrite.html

Re: [users@httpd] virtual host precedence ?

2012-07-10 Thread Norman Peelman

On 07/10/2012 10:20 AM, Roland Roland wrote:
Can anyone help me out in understand how/why virtual host take 
precedence on the same ip ?

like i always face an issue where two distinct virtual hosts are set.
the first works, the second doesn't unless i bump it up so it becomes 
the first listed in the conf file.




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


  The first defined/created virtual-host serves as the default when 
nothing else matches. How are you defining your virtual-hosts?

Chances are you don't have them set up correctly.

example (* matches on any IP apache is bound on.):

NameVirtualHost *
VirtualHost *
   # when nothing else matches ServerName or ServerAlias, apache comes here
   ServerAdmin email address
   ServerName example.com
   ServerAlias www.example.com
   DocumentRoot /path/to/files
   DirectoryIndex index.php index.htm
...
/VirtualHost
VirtualHost *
   # matches on ServerName or ServerAlias
   ServerAdmin email address
   ServerName example2.com
   ServerAlias www.example2.com
   DocumentRoot /path/to/files2
   DirectoryIndex index.php index.htm
...
/VirtualHost
VirtualHost *
   # matches on ServerName or ServerAlias
   ServerAdmin email address
   ServerName example3.com
   ServerAlias www.example3.com
   DocumentRoot /path/to/files3
   DirectoryIndex index.php index.htm
...
/VirtualHost

  The 'NameVirtualHost *' directive may be located in your main apache 
(httpd) .config file, and your VirtualHosts could be in the same file or 
a separate .config file, or individual files themselves. If all together 
then make the first one point to a default setup (site map?, redirect?). 
If individual files then make sure the default VirtualHost filename is 
something guaranteed to be loaded first, like '000-default' or similar. 
I think my initial installation came that way.


--
Norman
Registered Linux user #461062
-Have you been to www.apache.org yet?-

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



Re: [users@httpd] virtual host precedence ?

2012-07-10 Thread Igor Cicimov
On Wed, Jul 11, 2012 at 12:20 AM, Roland Roland r_o_l_a_...@hotmail.comwrote:

 Can anyone help me out in understand how/why virtual host take precedence
 on the same ip ?
 like i always face an issue where two distinct virtual hosts are set.
 the first works, the second doesn't unless i bump it up so it becomes the
 first listed in the conf file.


The requests for each of the domains you host will go to the appropriate
virtual host. If you are asking about the ones that don't have a virtual
host then the first VirtualHost in the config file is the default one. All
explained here: http://httpd.apache.org/docs/2.0/vhosts/name-based.html


Re: [users@httpd] Virtual Host Directory Permissions Problem

2011-03-14 Thread Dennis Putnam
Thanks for the reply. I removed the 443 from that directive, since I'm
using standard ports, I don't think I need to specify anything. I
believe that may have been added automatically by Webmin at some point
when I was messing with it.

Here is the httpd -S output:

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:443  primary.localdomain
(/etc/httpd/conf/vhosts.d/01_default_ssl_vhost.conf:13)
*:*primary.mydomain.com
(/etc/httpd/conf/httpd.conf:1116)
*:*newvh.mydomain.com (/etc/httpd/conf/httpd.conf:1127)
Syntax OK

I don't see anything there that hints at the document root for the
virtual hosts which is the crux of my problem. Howevwer, I did find an
error in the httpd log that is obviously related.

(13)Permission denied: /var/www/html/Scripts/Menu132/.htaccess
pcfg_openfile: unable to check htaccess file, ensure it is readable,
referer: http://newvh.mydomain.com/

I don't see why there is a permissions problem with that subdirectory
since it is not referenced in the page attempting to load. It must be
because it is loading the index.html from the primary document root.
Which it does successfully (that seems like a security issue to me) and
which also does not reference that menu directory.

On 3/13/2011 10:40 PM, Francois Gingras wrote:
 On Sun, Mar 13, 2011 at 4:59 PM, Hossy hossy-apa...@hossy.com wrote:
 1. What are you typing to access it?
 2. Try removing the :443 from your primary ServerName entry.  I believe
 the port is defined inside the VirtualHost tag.

 -Original Message-
 From: Dennis Putnam [mailto:d...@bellsouth.net]
 Sent: Sunday, March 13, 2011 1:27 PM
 To: users@httpd.apache.org
 Subject: [users@httpd] Virtual Host Directory Permissions Problem

 I am setting up a new virtual host and am having trouble with the root
 directory. My new virtual host document root (/var/www/html/vhroot) is a
 child directory of my primary host root (/var/www/html). Is it legal to do
 that? When I try to access my new virtual host, I get the index from the
 primary document root. TIA.

 Here are my virtual host directives:

 Primary

 VirtualHost *
 DocumentRoot /var/www/html
 ServerName primary.mydomain.com:443
 Directory /var/www/html
 allow from all
 Options +Indexes
 /Directory
 /VirtualHost

 New VH

 VirtualHost *
 DocumentRoot /var/www/html/vhroot
 ServerName newvh.mydomain.com
 Directory /var/www/html/vhroot
 allow from all
 Options +Indexes
 /Directory
 /VirtualHost



 -
 The official User-To-User support forum of the Apache HTTP Server Project.
 See URL:http://httpd.apache.org/userslist.html for more info.
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org


 There are several issues with your vhosts:

 1) Assuming you want those to work on any interface, use *:PORT
 instead of *. Port 80 is for HTTP, and 443 is for HTTPS, normally.

 2) Let's see httpd -S or apache2ctl -S under debian to see the full
 extent of your virtual hosts configuration.

 Frank.

 -
 The official User-To-User support forum of the Apache HTTP Server Project.
 See URL:http://httpd.apache.org/userslist.html for more info.
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   from the digest: users-digest-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org







signature.asc
Description: OpenPGP digital signature


RE: [users@httpd] Virtual Host Directory Permissions Problem

2011-03-13 Thread Hossy
1. What are you typing to access it?
2. Try removing the :443 from your primary ServerName entry.  I believe
the port is defined inside the VirtualHost tag.

-Original Message-
From: Dennis Putnam [mailto:d...@bellsouth.net] 
Sent: Sunday, March 13, 2011 1:27 PM
To: users@httpd.apache.org
Subject: [users@httpd] Virtual Host Directory Permissions Problem

I am setting up a new virtual host and am having trouble with the root
directory. My new virtual host document root (/var/www/html/vhroot) is a
child directory of my primary host root (/var/www/html). Is it legal to do
that? When I try to access my new virtual host, I get the index from the
primary document root. TIA.

Here are my virtual host directives:

Primary

VirtualHost *
DocumentRoot /var/www/html
ServerName primary.mydomain.com:443
Directory /var/www/html
allow from all
Options +Indexes
/Directory
/VirtualHost

New VH

VirtualHost *
DocumentRoot /var/www/html/vhroot
ServerName newvh.mydomain.com
Directory /var/www/html/vhroot
allow from all
Options +Indexes
/Directory
/VirtualHost



-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Virtual Host Directory Permissions Problem

2011-03-13 Thread Francois Gingras
On Sun, Mar 13, 2011 at 4:59 PM, Hossy hossy-apa...@hossy.com wrote:
 1. What are you typing to access it?
 2. Try removing the :443 from your primary ServerName entry.  I believe
 the port is defined inside the VirtualHost tag.

 -Original Message-
 From: Dennis Putnam [mailto:d...@bellsouth.net]
 Sent: Sunday, March 13, 2011 1:27 PM
 To: users@httpd.apache.org
 Subject: [users@httpd] Virtual Host Directory Permissions Problem

 I am setting up a new virtual host and am having trouble with the root
 directory. My new virtual host document root (/var/www/html/vhroot) is a
 child directory of my primary host root (/var/www/html). Is it legal to do
 that? When I try to access my new virtual host, I get the index from the
 primary document root. TIA.

 Here are my virtual host directives:

 Primary

 VirtualHost *
 DocumentRoot /var/www/html
 ServerName primary.mydomain.com:443
 Directory /var/www/html
 allow from all
 Options +Indexes
 /Directory
 /VirtualHost

 New VH

 VirtualHost *
 DocumentRoot /var/www/html/vhroot
 ServerName newvh.mydomain.com
 Directory /var/www/html/vhroot
 allow from all
 Options +Indexes
 /Directory
 /VirtualHost



 -
 The official User-To-User support forum of the Apache HTTP Server Project.
 See URL:http://httpd.apache.org/userslist.html for more info.
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
      from the digest: users-digest-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org



There are several issues with your vhosts:

1) Assuming you want those to work on any interface, use *:PORT
instead of *. Port 80 is for HTTP, and 443 is for HTTPS, normally.

2) Let's see httpd -S or apache2ctl -S under debian to see the full
extent of your virtual hosts configuration.

Frank.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



RE: [users@httpd] Virtual host question- Webserver

2005-07-08 Thread Loganathan Ramasamy
Davide, 

Let us assume my hostnames 2287 and 2288 . How should I go about
creating a 

I tried the following is it correct ?

NameVirtualHost *:80
 VirtualHost *:9080
   ServerName BLRD2287
   DocumentRoot /www/docs/dummy-host.example.com
 /VirtualHost
 VirtualHost *:9081 
   ServerName BLRD2288
   DocumentRoot /www/docs/dummy-host.example.com
 /VirtualHost

I am not sure what should I specify for virtualHost entry ?


-Loga
-Original Message-
From: Davide Bianchi [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 08, 2005 5:09 PM
To: users@httpd.apache.org
Subject: Re: [EMAIL PROTECTED] Virtual host question- Webserver

Loganathan Ramasamy wrote:
 version of my application and I can access my application using the
 following two URLs
 
 http://blrd2287:9080/RPM
 http://blrd2287:9081/RPM
 
 As you might have noticed the domain name blrd2287 is same for both
 the URLs, So I am really confused about creating a virtual host in my
 web server conf file.

You need to use two different hostnames, even if they are fake
names and only works locally on your machine.

Davide

-
The official User-To-User support forum of the Apache HTTP Server
Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [users@httpd] Virtual host question- Webserver

2005-07-08 Thread Davide Bianchi
Loganathan Ramasamy wrote:
 Let us assume my hostnames 2287 and 2288 . How should I go about
 creating a 
 
 I tried the following is it correct ?

Nope. You should have something like:

NameVirtualHost *:80
VirtualHost *:80
ServerName BLRD2287
DocumentRoot /www/docs/dummy-host.example.com
/VirtualHost
VirtualHost *:80 
ServerName BLRD2288
DocumentRoot /www/docs/dummy-host.example.com
/VirtualHost

*AND* you should specify two different DocumentRoot (otherwise
both will point to the same data, then were is the advantage in
using VHosts?)

*IF* your Apache is listening on port 80. At this point you should
be able to get one or the other by using http://blrd2287/ or
http://blrd2288/

Davide


-
The official User-To-User support forum of the Apache HTTP Server Project.
See URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]