http(/s)://staff.mobcraft.org/
(Image 1 in Imgur album)
(Had to add \mobcraft.org before adding a subdomain for the same)
Hello, I recently started the process of using InfinityFree to have my own instance of BookStack running. The first steps I took was to follow the installation instructions to get the site working locally. Next, I migrated the local SQL db to the remote one graciously provided by IF by importing it. I then started the lengthy process of moving ~12,000 files via FTP into the staff.mobcraft.org/htdocs/BookStack folder (took 5+ hours). Once all this was done I wrote a .htaccess file in staff.mobcraft.org/htdocs/ with the following content:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ /BookStack/public/$1 [L]
</<IfModule>
My .env uses APP_URL=https://staff.mobcraft.org so my SSL cert had to be up. I got to the stage of getting the cert issued with IF but even after a day of copying the Private Key and Certificate keys into the SSL section of cPanel, status still shows as follows:
(Image 2 in Imgur album)
Visiting the site throws a generic Site not found error:
(Image 3 in Imgur album)
(Imgur: The magic of the Internet)
I would highly appreciate help with this as I lam quite literally losing sleep over this. I hope you have a great day and an amazing new year!
Hi and welcome to the forum! Since you’re using Cloudflare’s nameservers, you’ll have to create another A record on your DNS dashboard there with name staff and as target the website IP shown on the Client Area for your hosting account for your subdomain to work.
Hey @JxstErg1, I appreciate your response! That did seem to be the right next step, not sure if I missed the Knowledge Base on this. Now the site opens with Let’s Encrypt verification (https://staff.mobcraft.org/) but gives a 500 error when opening (APP_DEBUG=true and errors are enabled in cPanel). Now I am aware this is something I need to solve myself, but I am not sure where to begin as this was not something I wrote up from scratch. Developer does not provide support against shared hosting due to each of them having limitations. I would appreciate any help! Have a great day
You might need to start by checking the .htaccess file on your domain’s htdocs folder for any faulty lines and either fix or remove them, as the error is generated by the server and not the browser.
I checked your website, and it seems that the IfModule checks are causing problems.
The code seems fine as far as I can tell, but the error you see clearly indicates a .htaccess issue. And I just commented out those lines, and now your website works.
Note that the IfModule calls are not necessary. They only check if the Rewrite module is loaded, and only execute the rules if the module exists. Because if you use .htaccess directives from modules that are not loaded, you’ll also get errors.
Remember that our hosting always has the Rewrite module enabled (and you can safely assume that it is always the case). And if the module is not enabled, it’s not like your website will work anyway without the rewrite rules.
So I’m not sure why it’s the solution, but I recommend to remove those two lines to fix the issue.