I’m struggling with uploading my Kirby-Project to a managed webserver called Strato (German Hoster).
I’ve created a directory inside of “cgi-bin” which was already present. Inside of it, I’ve created another directory “elektro-schuetze-lucka” and within pasted everything from my Kirby Project.
Which files and settings do I have to tweak or create in order to display my website under my domain?
In other threads I’ve read something about some .htaccess or mod_rewrite Files, but I have no Idea at all where to put them or what its content should look like.
My current .htaccess within kirby looks like this:
# Kirby .htaccess
# rewrite rules
# enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team
RewriteEngine on
# make sure to set the RewriteBase correctly
# if you are running the site in a subfolder.
# Otherwise links or the entire site will break.
#
# If your homepage is http://yourdomain.com/mysite
# Set the RewriteBase to:
#
# RewriteBase /mysite
# In some enviroments it's necessary to
# set the RewriteBase to:
#
RewriteBase /elektro-schuetze-lucka
# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
# block all files in the site folder from being accessed directly
# except for requests to plugin assets files
#RewriteRule ^assets/plugins/([a-zA-Z0-9\.\-_%=]+)/(.*)$ site/plugins/$1/assets/$2 [L,N]
#RewriteCond $1 !^plugins/[a-zA-Z0-9\.\-_%=]+/assets/.*
RewriteRule ^site/(.*) index.php [L]
# block all files in the kirby folder from being accessed directly
RewriteRule ^kirby/(.*) index.php [L]
# make panel links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^panel/(.*) panel/index.php [L]
# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]
</IfModule>
# Additional recommended values
# Remove comments for those you want to use.
#
# AddDefaultCharset UTF-8
#
# php_flag short_open_tag on
There’s also the possiblity to detour my domain internally, and I did that in pointing it to elektro-schuetze-lucka
So by calling the website http://elektro-schuetze-lucka.de/ i get
Forbidden
You don’t have permission to access / on this server.
Guess key is to create a .htaccess and so on, but well I dont have an idea what to do.
Thanks in advance, (you may answer in German too, next to english of course)
The cgi-bin folder is not really the folder to put your website in, there should be a htdocs folder or similar somewhere.
Do you want to store multiple websites on that server? Then you would have to create multiple vhosts with there own vhost configuration. Maybe you can provide more information re your server structure.
I think you should try to create a htdocs folder next to the cgi-bin folder and then put your website inside that folder. Then in your settings, set the domain to that folder. Make sure to set the Apache settings to allow overwriting of web server configurations, otherwise the .htaccess file does not work.
There’s more information in the Strato Managed Server documentation
the cgi-bin folder is managed by the server: https://de.wikipedia.org/wiki/Common_Gateway_Interface
You should not use it to upload your website. When logging in through ftp, you´re already in your public “root”-www/ht-docs folder.
Copy your whole “elektro-schuetze-lucka” right into that folder, next to the cgi-bin. Inside the Strato Account Panel, you can redirect the URL to this subfolder. Should work.
I did as you said but it only shows the main page. Every other site ends in a ‘500 Internal Server Error’ page.
I moved the whole directory into / and deleted htdocs. My .htaccess remains the same and also points to that folder. Anything else I can do?
Deleting the rewrite base worked! Thank you!
This is the only thing I’ve changed besides moving the directory and upgrading to a higher package (don’t know if that’s necessary)
These instruction were really helpful.
However, I am tryign to host 2 websites.
When I am trying to put 2 folders under ht-docs, one for each webiste, only one website works.
Other one shows erros.