- Posts: 36
Question
404 Error after activating SSL with LetsEncrypt
- fredbeard
-
Topic Author
- Offline
- New Member
-
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.
- fisharebest
-
- Offline
- Administrator
-
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- fredbeard
-
Topic Author
- Offline
- New Member
-
- Posts: 36
Yes, this is the current config:Did you also update the base_url setting in data/config.ini.php
base_url=" www.antenatideltapo.it/webtrees "
rewrite_urls="0"
Please Log in or Create an account to join the conversation.
- fredbeard
-
Topic Author
- Offline
- New Member
-
- Posts: 36
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.
- Marky
-
- Offline
- Junior Member
-
- Posts: 109
Use https - base_url="https//antenatideltapo.it/webtrees"
webtrees v2.1.21
PHP v8.3.12
Please Log in or Create an account to join the conversation.
- fredbeard
-
Topic Author
- Offline
- New Member
-
- Posts: 36
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.")> base_url=" www.antenatideltapo.it/webtrees "
Use https - base_url="https//antenatideltapo.it/webtrees"
Please Log in or Create an account to join the conversation.
- bertkoor
-
- Offline
- Platinum Member
-
- Greetings from Utrecht, Holland
> 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
Please Log in or Create an account to join the conversation.
- Franz Frese
-
- Away
- Elite Member
-
Please Log in or Create an account to join the conversation.
- fredbeard
-
Topic Author
- Offline
- New Member
-
- Posts: 36
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
-
- Away
- Elite Member
-
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.
- fisharebest
-
- Offline
- Administrator
-
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
-
Topic Author
- Offline
- New Member
-
- Posts: 36
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.
- fisharebest
-
- Offline
- Administrator
-
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
-
Topic Author
- Offline
- New Member
-
- Posts: 36
I installed it later after I got a warning during the installation that some extensions were missingThere 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?
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.
- fisharebest
-
- Offline
- Administrator
-
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
-
Topic Author
- Offline
- New Member
-
- Posts: 36
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.