[users@httpd] Apache website conversion from alias to virtualhost

2022-06-08 Thread Thomas WILLIAMSON
Hello,

I have to take over an internal Web server that has been configured by a
colleague who is no longer there. Our developers team asks me to convert
applications URLs from an *Alias* to a *Virtualhosts* (subdomain naming)
system. For instance:

https://srv-intra.mydomain.fr/basecolldev


should become

https://basecolldev.mydomain.fr


My environment specifications:

   - Linux OpenSUSE Leap 15.3
   - Server version: Apache/2.4.51 (Linux/SUSE)
   - PHP 7.4.6 (cli) ( NTS )

*Issue description: *I can connect to https://basecolldev.mydomain.fr
despite some 404 errors showing in access_log file (see at the end of the
post). I have then a 404 error page when clicking the *login* button that
redirects to https://basecolldev.mydomain.fr/login. The login page is found
and displayed properly when I manually modify the URL to
https://basecolldev.mydomain.fr/index.php/login. This means that /index.php
is not required for home page connection but is for browsing the website. I
need to permanently prevent the /index.php suffix to show up in URL.

I describe below what I have configured so far and what remains
unfunctionnal.

I have first created a new vhost file
/etc/apache2/vhost.d/basecolldev-ssl.conf :




> DocumentRoot "/var/www/BaseCollDev/public"
> ServerName basecolldev.mydomain.fr
> ErrorLog /var/log/apache2/basecolldev-error_log
> TransferLog /var/log/apache2/basecolldev-access_log
> LogLevel alert rewrite:trace8


> 
>  #Order allow,deny
>  #allow from all
>  #AllowOverride All
>  Require all granted
>  Options -Indexes -Includes -ExecCGI -FollowSymlinks
> 


> 


I have then commented the lines related to the application Directory tag in
file /etc/apache2/default-server.conf :

DocumentRoot "/var/www"


> 
> Options FollowSymLinks
> AllowOverride None
> 
> Require all granted
> 
> 
> Order allow,deny
> Allow from all
> 
> 


> Alias /icons/ "/usr/share/apache2/icons/"
> Alias /phpmyadmin "/srv/www/htdocs/phpMyAdmin"


> 
> Options Indexes MultiViews
> AllowOverride None
> 
> Require all granted
> 
> 
> Order allow,deny
> Allow from all
> 
> 


>
> #
> #AllowOverride All
> #Require all granted
> #


> ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"


> 
> AllowOverride None
> Options +ExecCGI -Includes
> 
> Require all granted
> 
> 
> Order allow,deny
> Allow from all
> 
> 


> 
> UserDir public_html
> Include /etc/apache2/mod_userdir.conf
> 


> IncludeOptional /etc/apache2/conf.d/*.conf


> IncludeOptional /etc/apache2/conf.d/apache2-manual?conf




Extract from /var/log/apache2/basecolldev-access_log file relating to a
connection to the home page:

10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET / HTTP/1.1" 200 54206
> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
> /build/runtime.d94b3b43.js HTTP/1.1" 200 1505
> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/app.13d64c6c.js
> HTTP/1.1" 200 236
> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/2.9935185b.css
> HTTP/1.1" 200 64639
> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/app.6cefaab5.css
> HTTP/1.1" 200 163752
> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/2.28b18d57.js
> HTTP/1.1" 200 261268
> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
> /build/images/logoEdVBlanc.png HTTP/1.1" 200 6579
> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /_wdt/b07606 HTTP/1.1"
> 404 1280
> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
> /build/fonts/fa-solid-900.e8a427e1.woff2 HTTP/1.1" 200 78196
> 10.9.4.140 - - [03/Jun/2022:11:02:32 +0200] "GET /favicon.ico HTTP/1.1"
> 404 1280
> 10.9.4.140 - - [03/Jun/2022:11:02:32 +0200] "GET /_wdt/b07606 HTTP/1.1"
> 404 1280
> 10.9.4.140 - - [03/Jun/2022:11:02:33 +0200] "GET /_wdt/b07606 HTTP/1.1"
> 404 1280
> 10.9.4.140 - - [03/Jun/2022:11:02:34 +0200] "GET /_wdt/b07606 HTTP/1.1"
> 404 1280
> 10.9.4.140 - - [03/Jun/2022:11:02:35 +0200] "GET /_wdt/b07606 HTTP/1.1"
> 404 1280


Extract from /var/log/apache2/basecolldev-access_log file relating to a
connection to the login page:

10.9.4.140 - - [03/Jun/2022:11:03:47 +0200] "GET /login HTTP/1.1" 404 1280


I see no logs in /var/log/apache2/basecolldev-error_log file.

I enclose .htaccess files contents if necessary.

File /var/www/.htaccess :

# BEGIN WordPress
> 
> RewriteEngine On
> RewriteBase /
> RewriteRule ^index\.php$ - [L]
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /index.php [L]
> 
> # END WordPress


File /var/www/BaseCollDev/public/.htaccess :

DirectoryIndex index.php


> 
>  Options -MultiViews
> 


> 
> RewriteEngine On


> RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
> RewriteRule .* - [E=BASE:%1]


> RewriteCond %{HTTP:Authorization} .+
> RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]


Re: [users@httpd] Apache website conversion from alias to virtualhost

2022-06-08 Thread Yehuda Katz
You have "AllowOverride None" in your "". This means
your .htaccess file and therefore your mod_rewrite configuration is not
being read. The simplest option is "AllowOverride All" (you can specify
specific overrides too if you want).

- Y

Sent from a device with a very small keyboard and hyperactive autocorrect.

On Wed, Jun 8, 2022, 8:12 AM Thomas WILLIAMSON 
wrote:

> Hello,
>
> I have to take over an internal Web server that has been configured by a
> colleague who is no longer there. Our developers team asks me to convert
> applications URLs from an *Alias* to a *Virtualhosts* (subdomain naming)
> system. For instance:
>
> https://srv-intra.mydomain.fr/basecolldev
>
>
> should become
>
> https://basecolldev.mydomain.fr
>
>
> My environment specifications:
>
>- Linux OpenSUSE Leap 15.3
>- Server version: Apache/2.4.51 (Linux/SUSE)
>- PHP 7.4.6 (cli) ( NTS )
>
> *Issue description: *I can connect to https://basecolldev.mydomain.fr
> despite some 404 errors showing in access_log file (see at the end of the
> post). I have then a 404 error page when clicking the *login* button that
> redirects to https://basecolldev.mydomain.fr/login. The login page is
> found and displayed properly when I manually modify the URL to
> https://basecolldev.mydomain.fr/index.php/login. This means that
> /index.php is not required for home page connection but is for browsing
> the website. I need to permanently prevent the /index.php suffix to show
> up in URL.
>
> I describe below what I have configured so far and what remains
> unfunctionnal.
>
> I have first created a new vhost file
> /etc/apache2/vhost.d/basecolldev-ssl.conf :
>
> 
>
>
>> DocumentRoot "/var/www/BaseCollDev/public"
>> ServerName basecolldev.mydomain.fr
>> ErrorLog /var/log/apache2/basecolldev-error_log
>> TransferLog /var/log/apache2/basecolldev-access_log
>> LogLevel alert rewrite:trace8
>
>
>> 
>>  #Order allow,deny
>>  #allow from all
>>  #AllowOverride All
>>  Require all granted
>>  Options -Indexes -Includes -ExecCGI -FollowSymlinks
>> 
>
>
>> 
>
>
> I have then commented the lines related to the application Directory tag
> in file /etc/apache2/default-server.conf :
>
> DocumentRoot "/var/www"
>
>
>> 
>> Options FollowSymLinks
>> AllowOverride None
>> 
>> Require all granted
>> 
>> 
>> Order allow,deny
>> Allow from all
>> 
>> 
>
>
>> Alias /icons/ "/usr/share/apache2/icons/"
>> Alias /phpmyadmin "/srv/www/htdocs/phpMyAdmin"
>
>
>> 
>> Options Indexes MultiViews
>> AllowOverride None
>> 
>> Require all granted
>> 
>> 
>> Order allow,deny
>> Allow from all
>> 
>> 
>
>
>>
>> #
>> #AllowOverride All
>> #Require all granted
>> #
>
>
>> ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
>
>
>> 
>> AllowOverride None
>> Options +ExecCGI -Includes
>> 
>> Require all granted
>> 
>> 
>> Order allow,deny
>> Allow from all
>> 
>> 
>
>
>> 
>> UserDir public_html
>> Include /etc/apache2/mod_userdir.conf
>> 
>
>
>> IncludeOptional /etc/apache2/conf.d/*.conf
>
>
>> IncludeOptional /etc/apache2/conf.d/apache2-manual?conf
>
>
> 
>
> Extract from /var/log/apache2/basecolldev-access_log file relating to a
> connection to the home page:
>
> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET / HTTP/1.1" 200 54206
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
>> /build/runtime.d94b3b43.js HTTP/1.1" 200 1505
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/app.13d64c6c.js
>> HTTP/1.1" 200 236
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/2.9935185b.css
>> HTTP/1.1" 200 64639
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/app.6cefaab5.css
>> HTTP/1.1" 200 163752
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/2.28b18d57.js
>> HTTP/1.1" 200 261268
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
>> /build/images/logoEdVBlanc.png HTTP/1.1" 200 6579
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /_wdt/b07606 HTTP/1.1"
>> 404 1280
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
>> /build/fonts/fa-solid-900.e8a427e1.woff2 HTTP/1.1" 200 78196
>> 10.9.4.140 - - [03/Jun/2022:11:02:32 +0200] "GET /favicon.ico HTTP/1.1"
>> 404 1280
>> 10.9.4.140 - - [03/Jun/2022:11:02:32 +0200] "GET /_wdt/b07606 HTTP/1.1"
>> 404 1280
>> 10.9.4.140 - - [03/Jun/2022:11:02:33 +0200] "GET /_wdt/b07606 HTTP/1.1"
>> 404 1280
>> 10.9.4.140 - - [03/Jun/2022:11:02:34 +0200] "GET /_wdt/b07606 HTTP/1.1"
>> 404 1280
>> 10.9.4.140 - - [03/Jun/2022:11:02:35 +0200] "GET /_wdt/b07606 HTTP/1.1"
>> 404 1280
>
>
> Extract from /var/log/apache2/basecolldev-access_log file relating to a
> connection to the login page:
>
> 10.9.4.140 - - [03/Jun/2022:11:03:47 +0200] "GET /login HTTP/1.1" 404 1280
>
>
> I see no logs in /var/log/apache2/basecolldev-error_log file.
>
> I enclose .htaccess files contents if necessary.
>
>

Re: [users@httpd] Apache website conversion from alias to virtualhost

2022-06-08 Thread Thomas WILLIAMSON
Hello,

Thank you for such a quick response! Modifying this option in file
/etc/apache2/default-server.conf within  returns a
prohibited access (403 error) page:

[image: image.png]


--


Thomas WILLIAMSON • Technicien Systèmes et réseaux

*Tél.* 05 49 61 25 25 (*interne *: 2235)

*Eaux de Vienne - Siveer* • 55 rue de Bonneuil-Matours • 86000 Poitiers


Le mer. 8 juin 2022 à 14:19, Yehuda Katz  a écrit :

> You have "AllowOverride None" in your "". This means
> your .htaccess file and therefore your mod_rewrite configuration is not
> being read. The simplest option is "AllowOverride All" (you can specify
> specific overrides too if you want).
>
> - Y
>
> Sent from a device with a very small keyboard and hyperactive autocorrect.
>
> On Wed, Jun 8, 2022, 8:12 AM Thomas WILLIAMSON <
> t-william...@eauxdevienne.fr> wrote:
>
>> Hello,
>>
>> I have to take over an internal Web server that has been configured by a
>> colleague who is no longer there. Our developers team asks me to convert
>> applications URLs from an *Alias* to a *Virtualhosts* (subdomain naming)
>> system. For instance:
>>
>> https://srv-intra.mydomain.fr/basecolldev
>>
>>
>> should become
>>
>> https://basecolldev.mydomain.fr
>>
>>
>> My environment specifications:
>>
>>- Linux OpenSUSE Leap 15.3
>>- Server version: Apache/2.4.51 (Linux/SUSE)
>>- PHP 7.4.6 (cli) ( NTS )
>>
>> *Issue description: *I can connect to https://basecolldev.mydomain.fr
>> despite some 404 errors showing in access_log file (see at the end of the
>> post). I have then a 404 error page when clicking the *login* button
>> that redirects to https://basecolldev.mydomain.fr/login. The login page
>> is found and displayed properly when I manually modify the URL to
>> https://basecolldev.mydomain.fr/index.php/login. This means that
>> /index.php is not required for home page connection but is for browsing
>> the website. I need to permanently prevent the /index.php suffix to show
>> up in URL.
>>
>> I describe below what I have configured so far and what remains
>> unfunctionnal.
>>
>> I have first created a new vhost file
>> /etc/apache2/vhost.d/basecolldev-ssl.conf :
>>
>> 
>>
>>
>>> DocumentRoot "/var/www/BaseCollDev/public"
>>> ServerName basecolldev.mydomain.fr
>>> ErrorLog /var/log/apache2/basecolldev-error_log
>>> TransferLog /var/log/apache2/basecolldev-access_log
>>> LogLevel alert rewrite:trace8
>>
>>
>>> 
>>>  #Order allow,deny
>>>  #allow from all
>>>  #AllowOverride All
>>>  Require all granted
>>>  Options -Indexes -Includes -ExecCGI -FollowSymlinks
>>> 
>>
>>
>>> 
>>
>>
>> I have then commented the lines related to the application Directory tag
>> in file /etc/apache2/default-server.conf :
>>
>> DocumentRoot "/var/www"
>>
>>
>>> 
>>> Options FollowSymLinks
>>> AllowOverride None
>>> 
>>> Require all granted
>>> 
>>> 
>>> Order allow,deny
>>> Allow from all
>>> 
>>> 
>>
>>
>>> Alias /icons/ "/usr/share/apache2/icons/"
>>> Alias /phpmyadmin "/srv/www/htdocs/phpMyAdmin"
>>
>>
>>> 
>>> Options Indexes MultiViews
>>> AllowOverride None
>>> 
>>> Require all granted
>>> 
>>> 
>>> Order allow,deny
>>> Allow from all
>>> 
>>> 
>>
>>
>>>
>>> #
>>> #AllowOverride All
>>> #Require all granted
>>> #
>>
>>
>>> ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
>>
>>
>>> 
>>> AllowOverride None
>>> Options +ExecCGI -Includes
>>> 
>>> Require all granted
>>> 
>>> 
>>> Order allow,deny
>>> Allow from all
>>> 
>>> 
>>
>>
>>> 
>>> UserDir public_html
>>> Include /etc/apache2/mod_userdir.conf
>>> 
>>
>>
>>> IncludeOptional /etc/apache2/conf.d/*.conf
>>
>>
>>> IncludeOptional /etc/apache2/conf.d/apache2-manual?conf
>>
>>
>> 
>>
>> Extract from /var/log/apache2/basecolldev-access_log file relating to a
>> connection to the home page:
>>
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET / HTTP/1.1" 200 54206
>>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
>>> /build/runtime.d94b3b43.js HTTP/1.1" 200 1505
>>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/app.13d64c6c.js
>>> HTTP/1.1" 200 236
>>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/2.9935185b.css
>>> HTTP/1.1" 200 64639
>>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/app.6cefaab5.css
>>> HTTP/1.1" 200 163752
>>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/2.28b18d57.js
>>> HTTP/1.1" 200 261268
>>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
>>> /build/images/logoEdVBlanc.png HTTP/1.1" 200 6579
>>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /_wdt/b07606 HTTP/1.1"
>>> 404 1280
>>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
>>> /build/fonts/fa-solid-900.e8a427e1.woff2 HTTP/1.1" 200 78196
>>> 10.9.4.140 - - [03/Jun/2022:11:02:32 +0200] "GET /favicon.ico HTTP/1.1"
>>> 404 1280
>>> 10.9.4.140 - - [03/Jun/2022:11:02:32 +0200

Re: [users@httpd] Apache website conversion from alias to virtualhost

2022-06-08 Thread Thomas WILLIAMSON
Error log:

[Wed Jun 08 14:45:32.634334 2022] [rewrite:error] [pid 29729] [client
> 10.9.4.140:55414] AH00670: Options FollowSymLinks and
> SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also
> forbidden due to its similar ability to circumvent directory restrictions :
> /var/www/BaseCollDev/public/


Any idea?

Thomas


--


Thomas WILLIAMSON • Technicien Systèmes et réseaux

*Tél.* 05 49 61 25 25 (*interne *: 2235)

*Eaux de Vienne - Siveer* • 55 rue de Bonneuil-Matours • 86000 Poitiers


Le mer. 8 juin 2022 à 14:40, Thomas WILLIAMSON 
a écrit :

> Hello,
>
> Thank you for such a quick response! Modifying this option in file
> /etc/apache2/default-server.conf within  returns a
> prohibited access (403 error) page:
>
> [image: image.png]
>
>
> --
>
>
> Thomas WILLIAMSON • Technicien Systèmes et réseaux
>
> *Tél.* 05 49 61 25 25 (*interne *: 2235)
>
> *Eaux de Vienne - Siveer* • 55 rue de Bonneuil-Matours • 86000 Poitiers
>
>
> Le mer. 8 juin 2022 à 14:19, Yehuda Katz  a écrit :
>
>> You have "AllowOverride None" in your "". This
>> means your .htaccess file and therefore your mod_rewrite configuration is
>> not being read. The simplest option is "AllowOverride All" (you can specify
>> specific overrides too if you want).
>>
>> - Y
>>
>> Sent from a device with a very small keyboard and hyperactive autocorrect.
>>
>> On Wed, Jun 8, 2022, 8:12 AM Thomas WILLIAMSON <
>> t-william...@eauxdevienne.fr> wrote:
>>
>>> Hello,
>>>
>>> I have to take over an internal Web server that has been configured by a
>>> colleague who is no longer there. Our developers team asks me to convert
>>> applications URLs from an *Alias* to a *Virtualhosts* (subdomain
>>> naming) system. For instance:
>>>
>>> https://srv-intra.mydomain.fr/basecolldev
>>>
>>>
>>> should become
>>>
>>> https://basecolldev.mydomain.fr
>>>
>>>
>>> My environment specifications:
>>>
>>>- Linux OpenSUSE Leap 15.3
>>>- Server version: Apache/2.4.51 (Linux/SUSE)
>>>- PHP 7.4.6 (cli) ( NTS )
>>>
>>> *Issue description: *I can connect to https://basecolldev.mydomain.fr
>>> despite some 404 errors showing in access_log file (see at the end of the
>>> post). I have then a 404 error page when clicking the *login* button
>>> that redirects to https://basecolldev.mydomain.fr/login. The login page
>>> is found and displayed properly when I manually modify the URL to
>>> https://basecolldev.mydomain.fr/index.php/login. This means that
>>> /index.php is not required for home page connection but is for browsing
>>> the website. I need to permanently prevent the /index.php suffix to
>>> show up in URL.
>>>
>>> I describe below what I have configured so far and what remains
>>> unfunctionnal.
>>>
>>> I have first created a new vhost file
>>> /etc/apache2/vhost.d/basecolldev-ssl.conf :
>>>
>>> 
>>>
>>>
 DocumentRoot "/var/www/BaseCollDev/public"
 ServerName basecolldev.mydomain.fr
 ErrorLog /var/log/apache2/basecolldev-error_log
 TransferLog /var/log/apache2/basecolldev-access_log
 LogLevel alert rewrite:trace8
>>>
>>>
 
  #Order allow,deny
  #allow from all
  #AllowOverride All
  Require all granted
  Options -Indexes -Includes -ExecCGI -FollowSymlinks
 
>>>
>>>
 
>>>
>>>
>>> I have then commented the lines related to the application Directory tag
>>> in file /etc/apache2/default-server.conf :
>>>
>>> DocumentRoot "/var/www"
>>>
>>>
 
 Options FollowSymLinks
 AllowOverride None
 
 Require all granted
 
 
 Order allow,deny
 Allow from all
 
 
>>>
>>>
 Alias /icons/ "/usr/share/apache2/icons/"
 Alias /phpmyadmin "/srv/www/htdocs/phpMyAdmin"
>>>
>>>
 
 Options Indexes MultiViews
 AllowOverride None
 
 Require all granted
 
 
 Order allow,deny
 Allow from all
 
 
>>>
>>>

 #
 #AllowOverride All
 #Require all granted
 #
>>>
>>>
 ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
>>>
>>>
 
 AllowOverride None
 Options +ExecCGI -Includes
 
 Require all granted
 
 
 Order allow,deny
 Allow from all
 
 
>>>
>>>
 
 UserDir public_html
 Include /etc/apache2/mod_userdir.conf
 
>>>
>>>
 IncludeOptional /etc/apache2/conf.d/*.conf
>>>
>>>
 IncludeOptional /etc/apache2/conf.d/apache2-manual?conf
>>>
>>>
>>> 
>>>
>>> Extract from /var/log/apache2/basecolldev-access_log file relating to a
>>> connection to the home page:
>>>
>>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET / HTTP/1.1" 200 54206
 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
 /build/runtime.d94b3b43.js HTTP/1.1" 200 1505
 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/app.13d64c6c.js
 HTTP/1.1"

Re: [users@httpd] Apache website conversion from alias to virtualhost

2022-06-08 Thread Eric Covener
> 

avoid hostnames in VirtualHost tags.  If you don't care what IP
address the connection comes in on, use *:443.

On Wed, Jun 8, 2022 at 8:12 AM Thomas WILLIAMSON
 wrote:
>
> Hello,
>
> I have to take over an internal Web server that has been configured by a 
> colleague who is no longer there. Our developers team asks me to convert 
> applications URLs from an Alias to a Virtualhosts (subdomain naming) system. 
> For instance:
>
>> https://srv-intra.mydomain.fr/basecolldev
>
>
> should become
>
>> https://basecolldev.mydomain.fr
>
>
> My environment specifications:
>
> Linux OpenSUSE Leap 15.3
> Server version: Apache/2.4.51 (Linux/SUSE)
> PHP 7.4.6 (cli) ( NTS )
>
> Issue description: I can connect to https://basecolldev.mydomain.fr despite 
> some 404 errors showing in access_log file (see at the end of the post). I 
> have then a 404 error page when clicking the login button that redirects to 
> https://basecolldev.mydomain.fr/login. The login page is found and displayed 
> properly when I manually modify the URL to 
> https://basecolldev.mydomain.fr/index.php/login. This means that /index.php 
> is not required for home page connection but is for browsing the website. I 
> need to permanently prevent the /index.php suffix to show up in URL.
>
> I describe below what I have configured so far and what remains unfunctionnal.
>
> I have first created a new vhost file 
> /etc/apache2/vhost.d/basecolldev-ssl.conf :
>
>> 
>>
>>
>> DocumentRoot "/var/www/BaseCollDev/public"
>> ServerName basecolldev.mydomain.fr
>> ErrorLog /var/log/apache2/basecolldev-error_log
>> TransferLog /var/log/apache2/basecolldev-access_log
>> LogLevel alert rewrite:trace8
>>
>>
>> 
>>  #Order allow,deny
>>  #allow from all
>>  #AllowOverride All
>>  Require all granted
>>  Options -Indexes -Includes -ExecCGI -FollowSymlinks
>> 
>>
>>
>> 
>
>
> I have then commented the lines related to the application Directory tag in 
> file /etc/apache2/default-server.conf :
>
>> DocumentRoot "/var/www"
>>
>>
>> 
>> Options FollowSymLinks
>> AllowOverride None
>> 
>> Require all granted
>> 
>> 
>> Order allow,deny
>> Allow from all
>> 
>> 
>>
>>
>> Alias /icons/ "/usr/share/apache2/icons/"
>> Alias /phpmyadmin "/srv/www/htdocs/phpMyAdmin"
>>
>>
>> 
>> Options Indexes MultiViews
>> AllowOverride None
>> 
>> Require all granted
>> 
>> 
>> Order allow,deny
>> Allow from all
>> 
>> 
>>
>>
>>
>> #
>> #AllowOverride All
>> #Require all granted
>> #
>>
>>
>> ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
>>
>>
>> 
>> AllowOverride None
>> Options +ExecCGI -Includes
>> 
>> Require all granted
>> 
>> 
>> Order allow,deny
>> Allow from all
>> 
>> 
>>
>>
>> 
>> UserDir public_html
>> Include /etc/apache2/mod_userdir.conf
>> 
>>
>>
>> IncludeOptional /etc/apache2/conf.d/*.conf
>>
>>
>> IncludeOptional /etc/apache2/conf.d/apache2-manual?conf
>
>
> 
>
> Extract from /var/log/apache2/basecolldev-access_log file relating to a 
> connection to the home page:
>
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET / HTTP/1.1" 200 54206
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/runtime.d94b3b43.js 
>> HTTP/1.1" 200 1505
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/app.13d64c6c.js 
>> HTTP/1.1" 200 236
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/2.9935185b.css 
>> HTTP/1.1" 200 64639
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/app.6cefaab5.css 
>> HTTP/1.1" 200 163752
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/2.28b18d57.js 
>> HTTP/1.1" 200 261268
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET 
>> /build/images/logoEdVBlanc.png HTTP/1.1" 200 6579
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /_wdt/b07606 HTTP/1.1" 404 
>> 1280
>> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET 
>> /build/fonts/fa-solid-900.e8a427e1.woff2 HTTP/1.1" 200 78196
>> 10.9.4.140 - - [03/Jun/2022:11:02:32 +0200] "GET /favicon.ico HTTP/1.1" 404 
>> 1280
>> 10.9.4.140 - - [03/Jun/2022:11:02:32 +0200] "GET /_wdt/b07606 HTTP/1.1" 404 
>> 1280
>> 10.9.4.140 - - [03/Jun/2022:11:02:33 +0200] "GET /_wdt/b07606 HTTP/1.1" 404 
>> 1280
>> 10.9.4.140 - - [03/Jun/2022:11:02:34 +0200] "GET /_wdt/b07606 HTTP/1.1" 404 
>> 1280
>> 10.9.4.140 - - [03/Jun/2022:11:02:35 +0200] "GET /_wdt/b07606 HTTP/1.1" 404 
>> 1280
>
>
> Extract from /var/log/apache2/basecolldev-access_log file relating to a 
> connection to the login page:
>
>> 10.9.4.140 - - [03/Jun/2022:11:03:47 +0200] "GET /login HTTP/1.1" 404 1280
>
>
> I see no logs in /var/log/apache2/basecolldev-error_log file.
>
> I enclose .htaccess files contents if necessary.
>
> File /var/www/.htaccess :
>
>> # BEGIN WordPress
>> 
>> RewriteEngine On
>> RewriteBase /
>> RewriteRule ^index\.php$ - [L]
>> RewriteCond %{REQUEST_F

Re: [users@httpd] Apache website conversion from alias to virtualhost

2022-06-08 Thread Frank Gingras
As for the error log entry, it does tell you what to do exactly to fix the
issue. Do you understand it?

On Wed, 8 Jun 2022 at 08:51, Eric Covener  wrote:

> > 
>
> avoid hostnames in VirtualHost tags.  If you don't care what IP
> address the connection comes in on, use *:443.
>
> On Wed, Jun 8, 2022 at 8:12 AM Thomas WILLIAMSON
>  wrote:
> >
> > Hello,
> >
> > I have to take over an internal Web server that has been configured by a
> colleague who is no longer there. Our developers team asks me to convert
> applications URLs from an Alias to a Virtualhosts (subdomain naming)
> system. For instance:
> >
> >> https://srv-intra.mydomain.fr/basecolldev
> >
> >
> > should become
> >
> >> https://basecolldev.mydomain.fr
> >
> >
> > My environment specifications:
> >
> > Linux OpenSUSE Leap 15.3
> > Server version: Apache/2.4.51 (Linux/SUSE)
> > PHP 7.4.6 (cli) ( NTS )
> >
> > Issue description: I can connect to https://basecolldev.mydomain.fr
> despite some 404 errors showing in access_log file (see at the end of the
> post). I have then a 404 error page when clicking the login button that
> redirects to https://basecolldev.mydomain.fr/login. The login page is
> found and displayed properly when I manually modify the URL to
> https://basecolldev.mydomain.fr/index.php/login. This means that
> /index.php is not required for home page connection but is for browsing the
> website. I need to permanently prevent the /index.php suffix to show up in
> URL.
> >
> > I describe below what I have configured so far and what remains
> unfunctionnal.
> >
> > I have first created a new vhost file
> /etc/apache2/vhost.d/basecolldev-ssl.conf :
> >
> >> 
> >>
> >>
> >> DocumentRoot "/var/www/BaseCollDev/public"
> >> ServerName basecolldev.mydomain.fr
> >> ErrorLog /var/log/apache2/basecolldev-error_log
> >> TransferLog /var/log/apache2/basecolldev-access_log
> >> LogLevel alert rewrite:trace8
> >>
> >>
> >> 
> >>  #Order allow,deny
> >>  #allow from all
> >>  #AllowOverride All
> >>  Require all granted
> >>  Options -Indexes -Includes -ExecCGI -FollowSymlinks
> >> 
> >>
> >>
> >> 
> >
> >
> > I have then commented the lines related to the application Directory tag
> in file /etc/apache2/default-server.conf :
> >
> >> DocumentRoot "/var/www"
> >>
> >>
> >> 
> >> Options FollowSymLinks
> >> AllowOverride None
> >> 
> >> Require all granted
> >> 
> >> 
> >> Order allow,deny
> >> Allow from all
> >> 
> >> 
> >>
> >>
> >> Alias /icons/ "/usr/share/apache2/icons/"
> >> Alias /phpmyadmin "/srv/www/htdocs/phpMyAdmin"
> >>
> >>
> >> 
> >> Options Indexes MultiViews
> >> AllowOverride None
> >> 
> >> Require all granted
> >> 
> >> 
> >> Order allow,deny
> >> Allow from all
> >> 
> >> 
> >>
> >>
> >>
> >> #
> >> #AllowOverride All
> >> #Require all granted
> >> #
> >>
> >>
> >> ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
> >>
> >>
> >> 
> >> AllowOverride None
> >> Options +ExecCGI -Includes
> >> 
> >> Require all granted
> >> 
> >> 
> >> Order allow,deny
> >> Allow from all
> >> 
> >> 
> >>
> >>
> >> 
> >> UserDir public_html
> >> Include /etc/apache2/mod_userdir.conf
> >> 
> >>
> >>
> >> IncludeOptional /etc/apache2/conf.d/*.conf
> >>
> >>
> >> IncludeOptional /etc/apache2/conf.d/apache2-manual?conf
> >
> >
> > 
> >
> > Extract from /var/log/apache2/basecolldev-access_log file relating to a
> connection to the home page:
> >
> >> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET / HTTP/1.1" 200 54206
> >> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
> /build/runtime.d94b3b43.js HTTP/1.1" 200 1505
> >> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/app.13d64c6c.js
> HTTP/1.1" 200 236
> >> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/2.9935185b.css
> HTTP/1.1" 200 64639
> >> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
> /build/app.6cefaab5.css HTTP/1.1" 200 163752
> >> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /build/2.28b18d57.js
> HTTP/1.1" 200 261268
> >> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
> /build/images/logoEdVBlanc.png HTTP/1.1" 200 6579
> >> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET /_wdt/b07606 HTTP/1.1"
> 404 1280
> >> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
> /build/fonts/fa-solid-900.e8a427e1.woff2 HTTP/1.1" 200 78196
> >> 10.9.4.140 - - [03/Jun/2022:11:02:32 +0200] "GET /favicon.ico HTTP/1.1"
> 404 1280
> >> 10.9.4.140 - - [03/Jun/2022:11:02:32 +0200] "GET /_wdt/b07606 HTTP/1.1"
> 404 1280
> >> 10.9.4.140 - - [03/Jun/2022:11:02:33 +0200] "GET /_wdt/b07606 HTTP/1.1"
> 404 1280
> >> 10.9.4.140 - - [03/Jun/2022:11:02:34 +0200] "GET /_wdt/b07606 HTTP/1.1"
> 404 1280
> >> 10.9.4.140 - - [03/Jun/2022:11:02:35 +0200] "GET /_wdt/b07606 HTTP/1.1"
> 404 1280
> >
> >
> > Extract from /var/log/apache2/basecolldev-access_log file relating 

Re: [users@httpd] Apache website conversion from alias to virtualhost

2022-06-08 Thread Yehuda Katz
You probably need to do exactly what the error message says: You currently
have "-FollowSymlinks" in your options. You can probably just change that
to a + and make sure that it is in the directory configuration for /var/www

- Y

Sent from a device with a very small keyboard and hyperactive autocorrect.

On Wed, Jun 8, 2022, 8:50 AM Thomas WILLIAMSON 
wrote:

> Error log:
>
> [Wed Jun 08 14:45:32.634334 2022] [rewrite:error] [pid 29729] [client
>> 10.9.4.140:55414] AH00670: Options FollowSymLinks and
>> SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also
>> forbidden due to its similar ability to circumvent directory restrictions :
>> /var/www/BaseCollDev/public/
>
>
> Any idea?
>
> Thomas
>
>
> --
>
>
> Thomas WILLIAMSON • Technicien Systèmes et réseaux
>
> *Tél.* 05 49 61 25 25 (*interne *: 2235)
>
> *Eaux de Vienne - Siveer* • 55 rue de Bonneuil-Matours • 86000 Poitiers
>
>
> Le mer. 8 juin 2022 à 14:40, Thomas WILLIAMSON <
> t-william...@eauxdevienne.fr> a écrit :
>
>> Hello,
>>
>> Thank you for such a quick response! Modifying this option in file
>> /etc/apache2/default-server.conf within  returns a
>> prohibited access (403 error) page:
>>
>> [image: image.png]
>>
>>
>> --
>>
>>
>> Thomas WILLIAMSON • Technicien Systèmes et réseaux
>>
>> *Tél.* 05 49 61 25 25 (*interne *: 2235)
>>
>> *Eaux de Vienne - Siveer* • 55 rue de Bonneuil-Matours • 86000 Poitiers
>>
>>
>> Le mer. 8 juin 2022 à 14:19, Yehuda Katz  a écrit :
>>
>>> You have "AllowOverride None" in your "". This
>>> means your .htaccess file and therefore your mod_rewrite configuration is
>>> not being read. The simplest option is "AllowOverride All" (you can specify
>>> specific overrides too if you want).
>>>
>>> - Y
>>>
>>> Sent from a device with a very small keyboard and hyperactive
>>> autocorrect.
>>>
>>> On Wed, Jun 8, 2022, 8:12 AM Thomas WILLIAMSON <
>>> t-william...@eauxdevienne.fr> wrote:
>>>
 Hello,

 I have to take over an internal Web server that has been configured by
 a colleague who is no longer there. Our developers team asks me to convert
 applications URLs from an *Alias* to a *Virtualhosts* (subdomain
 naming) system. For instance:

 https://srv-intra.mydomain.fr/basecolldev


 should become

 https://basecolldev.mydomain.fr


 My environment specifications:

- Linux OpenSUSE Leap 15.3
- Server version: Apache/2.4.51 (Linux/SUSE)
- PHP 7.4.6 (cli) ( NTS )

 *Issue description: *I can connect to https://basecolldev.mydomain.fr
 despite some 404 errors showing in access_log file (see at the end of the
 post). I have then a 404 error page when clicking the *login* button
 that redirects to https://basecolldev.mydomain.fr/login. The login
 page is found and displayed properly when I manually modify the URL to
 https://basecolldev.mydomain.fr/index.php/login. This means that
 /index.php is not required for home page connection but is for
 browsing the website. I need to permanently prevent the /index.php
 suffix to show up in URL.

 I describe below what I have configured so far and what remains
 unfunctionnal.

 I have first created a new vhost file
 /etc/apache2/vhost.d/basecolldev-ssl.conf :

 


> DocumentRoot "/var/www/BaseCollDev/public"
> ServerName basecolldev.mydomain.fr
> ErrorLog /var/log/apache2/basecolldev-error_log
> TransferLog /var/log/apache2/basecolldev-access_log
> LogLevel alert rewrite:trace8


> 
>  #Order allow,deny
>  #allow from all
>  #AllowOverride All
>  Require all granted
>  Options -Indexes -Includes -ExecCGI -FollowSymlinks
> 


> 


 I have then commented the lines related to the application Directory
 tag in file /etc/apache2/default-server.conf :

 DocumentRoot "/var/www"


> 
> Options FollowSymLinks
> AllowOverride None
> 
> Require all granted
> 
> 
> Order allow,deny
> Allow from all
> 
> 


> Alias /icons/ "/usr/share/apache2/icons/"
> Alias /phpmyadmin "/srv/www/htdocs/phpMyAdmin"


> 
> Options Indexes MultiViews
> AllowOverride None
> 
> Require all granted
> 
> 
> Order allow,deny
> Allow from all
> 
> 


>
> #
> #AllowOverride All
> #Require all granted
> #


> ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"


> 
> AllowOverride None
> Options +ExecCGI -Includes
> 
> Require all granted
> 
> 
> Order allow,deny
> Allow from all
> 
> 


> 
> UserDir public_

Re: [users@httpd] Apache website conversion from alias to virtualhost

2022-06-08 Thread Thomas WILLIAMSON
Hello,

I eventually managed to make it functional, by following:

   - File /etc/apache2/default-server.conf within  : Allow
   Override *None* becomes Allow Override *All*
   - File /etc/apache2/vhosts.d/basecoll-ssl.conf within  : Options -Indexes -Includes -ExecCGI
   -FollowSymlinks becomes Options -Indexes -Includes -ExecCGI

@Yehuda Katz  : I have removed the -FollowSymlinks option
as mentioned above, as it is declared in the default-server.conf
file within  .

@Franck Gingras  : the error log message indeed guided
me on the -FollowSymlinks option (as the other -SymLinksIfOwnerMatch option
didn't occur in my config files). But to be honest, I didn't exactly
understand the issue, as I lack enough time to properly learn Apache
configuration basics.

I thank you all for precious help!

Thomas


--


Thomas WILLIAMSON • Technicien Systèmes et réseaux

*Tél.* 05 49 61 25 25 (*interne *: 2235)

*Eaux de Vienne - Siveer* • 55 rue de Bonneuil-Matours • 86000 Poitiers


Le mer. 8 juin 2022 à 14:52, Frank Gingras  a écrit :

> As for the error log entry, it does tell you what to do exactly to fix the
> issue. Do you understand it?
>
> On Wed, 8 Jun 2022 at 08:51, Eric Covener  wrote:
>
>> > 
>>
>> avoid hostnames in VirtualHost tags.  If you don't care what IP
>> address the connection comes in on, use *:443.
>>
>> On Wed, Jun 8, 2022 at 8:12 AM Thomas WILLIAMSON
>>  wrote:
>> >
>> > Hello,
>> >
>> > I have to take over an internal Web server that has been configured by
>> a colleague who is no longer there. Our developers team asks me to convert
>> applications URLs from an Alias to a Virtualhosts (subdomain naming)
>> system. For instance:
>> >
>> >> https://srv-intra.mydomain.fr/basecolldev
>> >
>> >
>> > should become
>> >
>> >> https://basecolldev.mydomain.fr
>> >
>> >
>> > My environment specifications:
>> >
>> > Linux OpenSUSE Leap 15.3
>> > Server version: Apache/2.4.51 (Linux/SUSE)
>> > PHP 7.4.6 (cli) ( NTS )
>> >
>> > Issue description: I can connect to https://basecolldev.mydomain.fr
>> despite some 404 errors showing in access_log file (see at the end of the
>> post). I have then a 404 error page when clicking the login button that
>> redirects to https://basecolldev.mydomain.fr/login. The login page is
>> found and displayed properly when I manually modify the URL to
>> https://basecolldev.mydomain.fr/index.php/login. This means that
>> /index.php is not required for home page connection but is for browsing the
>> website. I need to permanently prevent the /index.php suffix to show up in
>> URL.
>> >
>> > I describe below what I have configured so far and what remains
>> unfunctionnal.
>> >
>> > I have first created a new vhost file
>> /etc/apache2/vhost.d/basecolldev-ssl.conf :
>> >
>> >> 
>> >>
>> >>
>> >> DocumentRoot "/var/www/BaseCollDev/public"
>> >> ServerName basecolldev.mydomain.fr
>> >> ErrorLog /var/log/apache2/basecolldev-error_log
>> >> TransferLog /var/log/apache2/basecolldev-access_log
>> >> LogLevel alert rewrite:trace8
>> >>
>> >>
>> >> 
>> >>  #Order allow,deny
>> >>  #allow from all
>> >>  #AllowOverride All
>> >>  Require all granted
>> >>  Options -Indexes -Includes -ExecCGI -FollowSymlinks
>> >> 
>> >>
>> >>
>> >> 
>> >
>> >
>> > I have then commented the lines related to the application Directory
>> tag in file /etc/apache2/default-server.conf :
>> >
>> >> DocumentRoot "/var/www"
>> >>
>> >>
>> >> 
>> >> Options FollowSymLinks
>> >> AllowOverride None
>> >> 
>> >> Require all granted
>> >> 
>> >> 
>> >> Order allow,deny
>> >> Allow from all
>> >> 
>> >> 
>> >>
>> >>
>> >> Alias /icons/ "/usr/share/apache2/icons/"
>> >> Alias /phpmyadmin "/srv/www/htdocs/phpMyAdmin"
>> >>
>> >>
>> >> 
>> >> Options Indexes MultiViews
>> >> AllowOverride None
>> >> 
>> >> Require all granted
>> >> 
>> >> 
>> >> Order allow,deny
>> >> Allow from all
>> >> 
>> >> 
>> >>
>> >>
>> >>
>> >> #
>> >> #AllowOverride All
>> >> #Require all granted
>> >> #
>> >>
>> >>
>> >> ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
>> >>
>> >>
>> >> 
>> >> AllowOverride None
>> >> Options +ExecCGI -Includes
>> >> 
>> >> Require all granted
>> >> 
>> >> 
>> >> Order allow,deny
>> >> Allow from all
>> >> 
>> >> 
>> >>
>> >>
>> >> 
>> >> UserDir public_html
>> >> Include /etc/apache2/mod_userdir.conf
>> >> 
>> >>
>> >>
>> >> IncludeOptional /etc/apache2/conf.d/*.conf
>> >>
>> >>
>> >> IncludeOptional /etc/apache2/conf.d/apache2-manual?conf
>> >
>> >
>> > 
>> >
>> > Extract from /var/log/apache2/basecolldev-access_log file relating to a
>> connection to the home page:
>> >
>> >> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET / HTTP/1.1" 200 54206
>> >> 10.9.4.140 - - [03/Jun/2022:11:02:31 +0200] "GET
>> /build/runtime.d94b3b43.js HTTP/1.1" 200 1505
>> >> 10.9.4.140 - - [03/Jun/202

[users@httpd] reverse proxy issue

2022-06-08 Thread Serge Krawczenko
Hello,

My issue is very simple but complicated by sudden behavior.
We're unable to resolve it for years so decided to request community's help.

We have application server behind httpd as a reverse proxy,
with basic ldap auth, so only ldap authenticated users are able to get into
the application.
(Require valid-user
Allow from all
)

Everything works well and configuration is very basic.
However,
Sometimes like once in a month or two it fails and httpd stops acting like
a reverse proxy.
I.e. https://url/my-app fails with 404 trying to find my-app locally.
(the requested URL /my-app was not found on this server)

It is 'fixed' by restarting httpd and is very annoying for users.

Debug turned on for proxy and ldap modules and there's absolutely nothing
suspicious.
When the situation occurs, there's just no attempt to refer to the
'proxypass' it is
just trying to get the local path immediately.

It cannot be reproduced as well and there's no specific periodicity for
this failure.
Anything i'm missing? Any more debug to turn on?

appreciate any ideas.


Re: [users@httpd] Apache website conversion from alias to virtualhost

2022-06-08 Thread Tom Browder
On Wed, Jun 8, 2022 at 07:12 Thomas WILLIAMSON 
wrote:

> Hello,
>
> I have to take over an internal Web server that has been configured by a
> colleague who is no longer there. Our developers team asks me to convert
> applications URLs from an *Alias* to a *Virtualhosts* (subdomain naming)
> system. For instance:
>
> https://srv-intra.mydomain.fr/basecolldev
>
>
> should become
>
> https://basecolldev.mydomain.fr
>
>
I am curious as to why they think there is a need for a change since the
alias can handle the desired name format. And the alias should be much
easier to maintain.

-Tom


Re: [users@httpd] Apache website conversion from alias to virtualhost

2022-06-08 Thread Paul Kudla (SCOM.CA Internet Services Inc.)



please note that changing the site around

you will also have to update your dns to point to the webserver

ie : basecolldev.mydomain.fr

needs a dns lookup

otherwise apache virtual hosts would get setup to match

fyi



Happy Wednesday !!!
Thanks - paul

Paul Kudla


Scom.ca Internet Services 
004-1009 Byron Street South
Whitby, Ontario - Canada
L1N 4S3

Toronto 416.642.7266
Main 1.866.411.7266
Fax 1.888.892.7266
Email p...@scom.ca

On 6/8/2022 12:18 PM, Tom Browder wrote:
On Wed, Jun 8, 2022 at 07:12 Thomas WILLIAMSON 
mailto:t-william...@eauxdevienne.fr>> wrote:


Hello,

I have to take over an internal Web server that has been configured
by a colleague who is no longer there. Our developers team asks me
to convert applications URLs from an /Alias/ to a /Virtualhosts/
(subdomain naming) system. For instance:

https://srv-intra.mydomain.fr/basecolldev



should become

https://basecolldev.mydomain.fr 


I am curious as to why they think there is a need for a change since the 
alias can handle the desired name format. And the alias should be much 
easier to maintain.


-Tom

--
This message has been scanned for viruses and
dangerous content by *MailScanner* , and is
believed to be clean.


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



Re: [users@httpd] reverse proxy issue

2022-06-08 Thread Yann Ylavic
On Wed, Jun 8, 2022 at 3:21 PM Serge Krawczenko  wrote:
>
> We have application server behind httpd as a reverse proxy,
> with basic ldap auth, so only ldap authenticated users are able to get into 
> the application.
> (Require valid-user
> Allow from all
> )

It's usually not a good idea to mix Require (httpd >= 2.4) and Allow
(httpd < 2.4) directives together, though I don't see how it could
lead to the symptoms you are seeing.

>
> Everything works well and configuration is very basic.
> However,
> Sometimes like once in a month or two it fails and httpd stops acting like a 
> reverse proxy.
> I.e. https://url/my-app fails with 404 trying to find my-app locally.
> (the requested URL /my-app was not found on this server)

If there are multiple VirtualHosts on the same IP:port in your server,
possibly some requests reach one with no "ProxyPass /my-app ..."
defined?
It may happen if an unknown Host/SNI is handled by the default vhost
for instance, but it wouldn't explain why all the following requests
go there (unless the app/something at some point starts redirecting to
a different URL).

>
> It is 'fixed' by restarting httpd and is very annoying for users.
>
> Debug turned on for proxy and ldap modules and there's absolutely nothing 
> suspicious.
> When the situation occurs, there's just no attempt to refer to the 
> 'proxypass' it is
> just trying to get the local path immediately.
>
> It cannot be reproduced as well and there's no specific periodicity for this 
> failure.
> Anything i'm missing? Any more debug to turn on?

Which httpd MPM and modules are used? It could be a non thread-safe
module running on a threaded MPM, corrupting some global state when
the load increases.


Regards;
Yann.

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



Re: [users@httpd] reverse proxy issue

2022-06-08 Thread Deepak Goel
How does Apache access the application server? Is the ip address of
application server changing (and it coincides with the 404 error)?


Deepak
"The greatness of a nation can be judged by the way its animals are treated
- Mahatma Gandhi"

+91 73500 12833
deic...@gmail.com

Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool

"Plant a Tree, Go Green"

Make In India : http://www.makeinindia.com/home


On Wed, Jun 8, 2022 at 10:36 PM Yann Ylavic  wrote:

> On Wed, Jun 8, 2022 at 3:21 PM Serge Krawczenko 
> wrote:
> >
> > We have application server behind httpd as a reverse proxy,
> > with basic ldap auth, so only ldap authenticated users are able to get
> into the application.
> > (Require valid-user
> > Allow from all
> > )
>
> It's usually not a good idea to mix Require (httpd >= 2.4) and Allow
> (httpd < 2.4) directives together, though I don't see how it could
> lead to the symptoms you are seeing.
>
> >
> > Everything works well and configuration is very basic.
> > However,
> > Sometimes like once in a month or two it fails and httpd stops acting
> like a reverse proxy.
> > I.e. https://url/my-app fails with 404 trying to find my-app locally.
> > (the requested URL /my-app was not found on this server)
>
> If there are multiple VirtualHosts on the same IP:port in your server,
> possibly some requests reach one with no "ProxyPass /my-app ..."
> defined?
> It may happen if an unknown Host/SNI is handled by the default vhost
> for instance, but it wouldn't explain why all the following requests
> go there (unless the app/something at some point starts redirecting to
> a different URL).
>
> >
> > It is 'fixed' by restarting httpd and is very annoying for users.
> >
> > Debug turned on for proxy and ldap modules and there's absolutely
> nothing suspicious.
> > When the situation occurs, there's just no attempt to refer to the
> 'proxypass' it is
> > just trying to get the local path immediately.
> >
> > It cannot be reproduced as well and there's no specific periodicity for
> this failure.
> > Anything i'm missing? Any more debug to turn on?
>
> Which httpd MPM and modules are used? It could be a non thread-safe
> module running on a threaded MPM, corrupting some global state when
> the load increases.
>
>
> Regards;
> Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>