Website isn't working on uberspace-server

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?

Thanks for your help!

Felix :slight_smile:

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.

At Uberspace, the most common issue is a missing RewriteBase. You should uncomment the line in Kirby’s .htaccess and set it to RewriteBase /.

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.

I did some research: in my .htaccess I use

php_flag short_open_tag on

so did the follwing steps:


; short_open_tag
; Default Value: On
; Development Value: On
; Production Value: On

  • restart PHP-interpreter

unfortunatly no success. Is there a need to do changes in the original php.ini? Is the .htaccess wrong?

Sorry I’m quite new to all this stuff :slight_smile:

Thank you so much!

First, I would try to change the .htaccess settings. The php version on uberspace should support short_open_tag by default. Please change …

php_flag short_open_tag on


# php_flag short_open_tag on

Your changes in php.ini won’t work, because the leading semicolon marks it as a comment and it means “ignore this line”.

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.

Thank you Lukas and also Flo!

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 :wink:

this is my file right now:

# Kirby .htaccess

# rewrite rules
<IfModule mod_rewrite.c>

# enable awesome urls. i.e.:
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
# 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]


# 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)
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

#   Required for svg webfonts on iPad
AddType     image/svg+xml              svg svgz
AddEncoding gzip                       svgz

# Webfonts
AddType application/  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.*

# ----------------------------------------------------------------------
# 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/ "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"


<Files .htaccess>
  order allow,deny
  deny from all

May I suggest you test this with the Kirby default .htaccess without all your additions except the RewriteBase first?

Uberspace do use an Apache server, otherwise you would not be able to use an .htaccess file :wink:

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.

Are you using Kirby in a subdirectory? In that case you need to adapt the RewriteBase.

This is the structure: /var/www/virtual/username/html/wunderwelten so I access the site via

Then it should be RewriteBase /wunderwelten.

Does this alter the domain name too?

What do you mean exactly?

Like can I still access the Page via or do I need to just type 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? :slight_smile:

No I don’t want it to be accessible from the root :smiley: 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.).

That would be indeed the cleanest way to do it yes.