I followed to build a web server tutorial and successfully installed it on my server. After that I installed SSL certificate with certbot package and configured some setting backend and core_config table.
I can access websites except the admin page after SSL.
Am I need setup something in apache server or in .htaccess ?
https://www.street34.com/admin
magento 2.4.1
What i did for fixing attempt ?
sudo vi /etc/apache2/apache2.conf
change the piece of code:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
for this one:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
But nothing changed.
I think found the solution so what I change on my server;
First of all changed the secure_admin configuration to “0” from “1” in core_config_table for accessing to admin page wihout SSL.
& you can open magento2.com.conf file using nano command.
sudo nano /etc/apache2/sites-available/magento2.com.conf
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName magento2.com
ServerAlias www.magento2.com
DocumentRoot /var/www/html/magento2
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/magento2>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Step 3: Enable virtual host configuration files
From command line: sudo a2ensite magento2.com.conf
Step 4: start apache service
From command line: sudo service apache2 restart
Step 5: add host entry
From command line: sudo nano /etc/hosts
add below line in hosts file
127.0.0.1 magento2.com
Restart apache server.
Now I can access admin page without SSL and for this time changed all setting one by one.
(First off changed secure url link after that secure admin like so… every settings one by one )
After these setup I can access with SSL all of page and admin.