Web based family history software

file Question 404 Error after activating SSL with LetsEncrypt

  • fredbeard
  • fredbeard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 6 days ago #1 by fredbeard
Dear all, 

I am stucking with an issue after having installed digital certificates with Let's Encrypt. Now when accessing the index.php page I got a 404 error "The requested URL was not found on this server."
I am running webtrees on a AWS linux 2023 installation - webtrees version is the last available and since the activation of the public DNS pointing to my domain and SSL activation, everything was working well.

I have seen that I got an additional config at the end of the httpd.conf file - this is the end of the file
<VirtualHost *:80>
        DocumentRoot /var/www/html/webtrees
        DirectoryIndex index.php
        ServerName antenatideltapo.it
        ServerAlias www.antenatideltapo.it
        <Directory /var/www/html/webtrees>
                Options -Indexes
                Options FollowSymLinks
                AllowOverride All
                Require all granted
        </Directory>

RewriteEngine on
RewriteCond %{SERVER_NAME} =antenatideltapo.it [OR]
RewriteCond %{SERVER_NAME} =www.antenatideltapo.it
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
Include /etc/httpd/conf/httpd-le-ssl.conf

In the httpd-le-ssl.conf file I got the following:
<IfModule mod_ssl.c>
<VirtualHost *:443>
        DocumentRoot /var/www/html/webtrees
        DirectoryIndex index.php
        ServerName antenatideltapo.it
        ServerAlias www.antenatideltapo.it
        <Directory /var/www/html/webtrees>
                Options -Indexes
                Options FollowSymLinks
                AllowOverride All
                Require all granted
        </Directory>

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/antenatideltapo.it/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/antenatideltapo.it/privkey.pem
</VirtualHost>
</IfModule>

Any idea of what is now wrong in the configuration?

Thanks
Federico

Please Log in or Create an account to join the conversation.

More
2 weeks 6 days ago #2 by fisharebest
Replied by fisharebest on topic 404 Error after activating SSL with LetsEncrypt
Did you also update the base_url setting in data/config.ini.php

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • fredbeard
  • fredbeard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 5 days ago #3 by fredbeard
Replied by fredbeard on topic 404 Error after activating SSL with LetsEncrypt

Did you also update the base_url setting in data/config.ini.php
 
Yes, this is the current config:

base_url=" www.antenatideltapo.it/webtrees "
rewrite_urls="0"
 

Please Log in or Create an account to join the conversation.

  • fredbeard
  • fredbeard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 5 days ago #4 by fredbeard
Replied by fredbeard on topic 404 Error after activating SSL with LetsEncrypt
I have seen that in the URL I got after the domain name the following redirect when trying to access webtrees

webtrees/www.antenatideltapo.it/webtrees/index.php?route=www.antenatideltapo.it%2Fwebtrees%2F

It seems as I got an additional redirect after the requested resource and after the route=

Please Log in or Create an account to join the conversation.

More
2 weeks 5 days ago - 2 weeks 5 days ago #5 by Marky
> base_url=" www.antenatideltapo.it/webtrees "

Use https - base_url="https//antenatideltapo.it/webtrees"
 

webtrees v2.1.21
PHP v8.3.12
Last edit: 2 weeks 5 days ago by Marky.

Please Log in or Create an account to join the conversation.

  • fredbeard
  • fredbeard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 5 days ago #6 by fredbeard
Replied by fredbeard on topic 404 Error after activating SSL with LetsEncrypt

> base_url=" www.antenatideltapo.it/webtrees "

Use https - base_url="https//antenatideltapo.it/webtrees"

 
Thanks, it is better - now the final URL is the expected one ( www.antenatideltapo.it/webtrees/index.php or www.antenatideltapo.it/webtrees/index.ph...ees%2Ftree%2FDeltaPo ) but I still receive a 404 error ("The requested URL was not found on this server.")



 

Please Log in or Create an account to join the conversation.

  • bertkoor
  • bertkoor's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
More
2 weeks 5 days ago - 2 weeks 5 days ago #7 by bertkoor

> base_url=" www.antenatideltapo.it/webtrees "

Use https - base_url="https//antenatideltapo.it/webtrees"


 

There should be a : inbetween https and //
To avoid the forum software makes true links, you can put it in a [code] [/code] block.

stamboom.BertKoor.nl runs on webtrees v2.1.20
Last edit: 2 weeks 5 days ago by bertkoor.

Please Log in or Create an account to join the conversation.

  • Franz Frese
  • Franz Frese's Avatar
  • Away
  • Elite Member
  • Elite Member
More
2 weeks 5 days ago #8 by Franz Frese
Replied by Franz Frese on topic 404 Error after activating SSL with LetsEncrypt
As your site still does not use pretty urls, you should have a look into your .htaccess or whatever mechanism you have to use. the  FAQ  gives the answer.

Please Log in or Create an account to join the conversation.

  • fredbeard
  • fredbeard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 5 days ago #9 by fredbeard
Replied by fredbeard on topic 404 Error after activating SSL with LetsEncrypt
Thanks both,

I have tried configuring also Pretty URLs but I got the same issue.

I have been able to look at the Apache logs and the issue is that when accessing the /webtrees/ URL, this is converted into /webtrees/webtrees/index.php - adding one additiona layer. But I can't identify where it could be configured in this way...
Trying to add an additional webtrees folder under the existing webtrees and putting there a index.php file, then I receive a 500 error, that is then expected

Please Log in or Create an account to join the conversation.

  • Franz Frese
  • Franz Frese's Avatar
  • Away
  • Elite Member
  • Elite Member
More
2 weeks 5 days ago #10 by Franz Frese
Replied by Franz Frese on topic 404 Error after activating SSL with LetsEncrypt
Undo everything so that your site does run.

Then follow the faq and all will be ok.

Sometimes it is only a / that makes the difference.
 

Please Log in or Create an account to join the conversation.

More
2 weeks 5 days ago #11 by fisharebest
Replied by fisharebest on topic 404 Error after activating SSL with LetsEncrypt
The document_root setting in your apache config is

DocumentRoot /var/www/html/webtrees

i.e. it says that the URL " antenatideltapo.it " is mapped onto the folder "/var/www/html/webtrees".

Your config.ini.php says

base_url=" antenatideltapo.it/webtrees "

It says that webtrees is installed in a sub-folder of antenatideltapo.it - in other words /var/www/html/webtrees/webtrees

Where do you want webtrees to be installed?

If you want " antenatideltapo.it/ ", then remove "/webtrees" from base_url.

If you want " antenatideltapo.it/webtrees ", then remove "/webtrees" from DocumentRoot.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • fredbeard
  • fredbeard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 4 days ago #12 by fredbeard
Replied by fredbeard on topic 404 Error after activating SSL with LetsEncrypt
Thanks Greg, now it works!

Unfortunately I am receving in the home page (I suppose it is the statistic box) the following error:

strtr(): Argument #1 ($string) must be of type string, false given …/app/Module/ModuleLanguageTrait.php:209
#0 …/app/Module/ModuleLanguageTrait.php(209): strtr()
#1 …/app/Module/TopSurnamesModule.php(118): Fisharebest\Webtrees\Module\LanguageItalian->normalize()
#2 …/resources/views/tree-page-block.phtml(20): Fisharebest\Webtrees\Module\TopSurnamesModule->getBlock()
#3 …/app/View.php(183): include('...')
#4 …/app/View.php(278): Fisharebest\Webtrees\View->render()
#5 …/app/Helpers/functions.php(126): Fisharebest\Webtrees\View::make()
#6 …/resources/views/tree-page.phtml(30): view()
#7 …/app/View.php(183): include('...')
#8 …/app/View.php(278): Fisharebest\Webtrees\View->render()
#9 …/app/Helpers/functions.php(126): Fisharebest\Webtrees\View::make()
#10 …/app/Http/ViewResponseTrait.php(51): view()
#11 …/app/Http/RequestHandlers/TreePage.php(81): Fisharebest\Webtrees\Http\RequestHandlers\TreePage->viewResponse()
#12 …/app/Http/Middleware/RequestHandler.php(52): Fisharebest\Webtrees\Http\RequestHandlers\TreePage->handle()
#13 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\RequestHandler->process()
#14 …/app/Module/HitCountFooterModule.php(149): Middleland\Dispatcher->handle()
#15 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Module\HitCountFooterModule->process()
#16 …/app/Module/CheckForNewVersion.php(117): Middleland\Dispatcher->handle()
#17 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Module\CheckForNewVersion->process()
#18 …/app/Http/Middleware/CheckCsrf.php(80): Middleland\Dispatcher->handle()
#19 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckCsrf->process()
#20 …/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle()
#21 …/app/Http/Middleware/Router.php(168): Middleland\Dispatcher->dispatch()
#22 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\Router->process()
#23 …/app/Http/Middleware/BootModules.php(58): Middleland\Dispatcher->handle()
#24 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BootModules->process()
#25 …/app/Http/Middleware/RegisterGedcomTags.php(54): Middleland\Dispatcher->handle()
#26 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\RegisterGedcomTags->process()
#27 …/app/Http/Middleware/LoadRoutes.php(75): Middleland\Dispatcher->handle()
#28 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\LoadRoutes->process()
#29 …/app/Http/Middleware/CheckForNewVersion.php(57): Middleland\Dispatcher->handle()
......

any idea on the reason?

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #13 by fisharebest
Replied by fisharebest on topic 404 Error after activating SSL with LetsEncrypt
There appears to be an issue with the php-intl extension on your server.

Is the PHP extension installed? Are the OS libraries for it installed?

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • fredbeard
  • fredbeard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 4 days ago #14 by fredbeard
Replied by fredbeard on topic 404 Error after activating SSL with LetsEncrypt

There appears to be an issue with the php-intl extension on your server.

Is the PHP extension installed? Are the OS libraries for it installed?
I installed it later after I got a warning during the installation that some extensions were missing

This is the current config of the module:

intl

Internationalization support => enabled
ICU version => 67.1
ICU Data version => 67.1
ICU TZData version => 2019c
ICU Unicode version => 13.0

Directive => Local Value => Master Value
intl.default_locale => no value => no value
intl.error_level => 0 => 0
intl.use_exceptions => Off => Off
 

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #15 by fisharebest
Replied by fisharebest on topic 404 Error after activating SSL with LetsEncrypt
Well, your error message says that a call to the INTL function normalizer_normalize() returned false instead of text in this line here:

github.com/fisharebest/webtrees/blob/1c6...nguageTrait.php#L206

False means "an error occurred" - www.php.net/manual/en/normalizer.normalize.php

So, there is an error in your INTL library.

I can't really guess the exact cause. But it is almost certainly an issue with your server configuration.

Now, if you don't have php-intl installed, then webtrees will use a slower, less functional, fall-back library. You could try uninstalling it and see what happens.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • fredbeard
  • fredbeard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 2 days ago #16 by fredbeard
Replied by fredbeard on topic 404 Error after activating SSL with LetsEncrypt
After reinstalling the library everything went fine.

Issues now solved and version 2.2.1 up & running on the new instance

Thanks

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum