Hey there! I finished development of my new website on my local machine. Everything is running smoothly but when Iâm uploading all files on my uberspace server I get a 500-errror.
all files & folders (âassetsâ, âcontentâ, âkirbyâ and so on) are located in the uberspace document root-folder called âhtmlâ. Is there a need for further steps? Do I need to set special permissions? Do I need to make changes to the .htaccess?
Error 500 usually relates to internal server error, a cause of this might be that you are running a different php version. Other causes could be, that something in your code makes the server respond with an error 500.
Have you tried uploading just the plain-kit version of kirby and see if the same error occures? If it doesnt i would check the your code again.
If you canât find the error, have a look at the error log. This might give you a hint. If you donât know where to find the log, the uberspace support team may grant access to it for you first. Just ask them.
Thank you so far. I uploaded the plain kit and the error log says:
Invalid command âphp_flagâ, perhaps misspelled or defined by a module not included in the server configuration.
Itâs not an issue with the php.ini. What you were trying to do is to set a PHP option from your .htaccess, which is an Apache configuration file. That only works if PHP is integrated into Apache directly, but Uberspace use a different setup that doesnât allow this.
You can however set the short_open_tag option in your php.ini file and remove the line from your .htaccess. Please note the following:
The php.ini change you posted only changed the comments (lines that start with ;). You need to change the line below the comment for the change to take effect.
Kirby does not recommend using short open tags, they can cause a lot of issues. Only enable the option if you are absolutely sure that you need them.
Error is solved but screens remains white. I guess that there is more stuff in my .htaccess that shouldnât be there regarding the fact that uberspace servers donât use apache
this is my file right now:
# Kirby .htaccess
# rewrite rules
<IfModule mod_rewrite.c>
# 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 /
# 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
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
#
# ----------------------------------------------------------------------
# Proper MIME type for all files
# ----------------------------------------------------------------------
# JavaScript
# Normalize to standard type (it's sniffed in IE anyways)
# tools.ietf.org/html/rfc4329#section-7.2
AddType application/javascript js
# Audio
AddType audio/ogg oga ogg
AddType audio/mp4 m4a
# Video
AddType video/ogg ogg ogv
AddType video/mp4 mp4 m4v
AddType video/webm webm
# SVG
# Required for svg webfonts on iPad
# twitter.com/FontSquirrel/status/14855840545
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
# Webfonts
AddType application/vnd.ms-fontobject eot
AddType application/x-font-ttf ttf ttc
AddType font/opentype otf
AddType application/x-font-woff woff
# Assorted types
AddType image/x-icon ico
AddType image/webp webp
AddType text/cache-manifest appcache manifest
AddType text/x-component htc
AddType application/x-chrome-extension crx
AddType application/x-opera-extension oex
AddType application/x-xpinstall xpi
AddType application/octet-stream safariextz
AddType application/x-web-app-manifest+json webapp
AddType text/x-vcard vcf
# ----------------------------------------------------------------------
# GZIP Compression
# ----------------------------------------------------------------------
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# ----------------------------------------------------------------------
# If you don't use filenames to version, lower the CSS and JS to something like
# "access plus 1 week" or so.
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Your document html
ExpiresByType text/html "access plus 0 seconds"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
# Feed
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/atom+xml "access plus 1 hour"
# Favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"
# Media: images, video, audio
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
# HTC files (css3pie)
ExpiresByType text/x-component "access plus 1 month"
# Webfonts
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
# CSS and JavaScript
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
</IfModule>
<Files .htaccess>
order allow,deny
deny from all
</Files>
I got the same problem since today and canât figure out why. I updated my php version on uberspace to 7.0.8.
The strange thing is that the panel is working without problems but the main site responds with error code 500. If I add the rewrite Base / to my .htaccess then the panel wonât work anymore.
Like can I still access the Page via http://someDevServerDomain.de/wunderwelten/ or do I need to just type http://someDevServerDomain.de/ when I use that rewrite rule?
No, the RewriteBase is just an internal Apache option. If you want the site to be accessible from the root of the domain, why do you use a subdirectory?
No I donât want it to be accessible from the root I thought this might result in that. I want to use sub directories for every project.
Everything is fine then (except that I still getting a 500 error code). I wrote an email to uberspace now and asking for help there. Maybe they can show me the logs or something. Iâm really lost on how I can fix that.
It probably wonât fix your issue, but you could also use subdomains for each site, thatâs recommended to keep it all separated (especially regarding cookies etc.).