Install the app
How to install the app on iOS

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

ubuntu/apache2 container crashes with error: serverroot must be a valid directory

2
1
NAS
DS920+, RS3617xs+
Last edited:
Hi community,

I'm quite new to the container topic on Synology, so I have a few questions about my issue.

A bit more context on the use-case: I intend to run an Apache2 instance as a container, which is more customizable than the native Apache2 package. Because the native package has content compression enabled by default, and I didn't find a way to disable compression for already compressed files (e.g. tgz).
Long story short, I found that the ubuntu/apache2 image from Docker Hub seems suitable for my use case.

The image has been downloaded in Container Manager and a container has been spun up with the following folder/file mappings (apache2.conf exists in the Syno folder):
  • /volume1/docker/<name>/html:/var/www/html:ro
  • /volume1/docker/<name>/apache2/apache2.conf:/etc/apache2/apache2.conf:ro
My issue, the container crashes immediately with the error: apache2: Syntax error on line 34 of /etc/apache2/apache2.conf: ServerRoot must be a valid directory

Does someone know what I did wrong?
 
Welcome.

My issue, the container crashes immediately with the error: apache2: Syntax error on line 34 of /etc/apache2/apache2.conf: ServerRoot must be a valid directory
And what is the actual line 34 of that file? Server root value is what?
 
Last edited:
Apologies for my delayed answer. Indeed, it was a mistake in the apache2.conf for ServerRoot. Thanks for this hint. Now it is working with this conf:
Code:
Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
ServerName depot.ksc.lab
ServerAdmin [email protected]
    <Directory /var/www/html>
        Options +Indexes +FollowSymLinks
        IndexOptions +FoldersFirst
        AllowOverride All
        Require all granted
    </Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
        Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf

.htaccess and .htpasswd is located in a subfolder that makes it password protected. That works now fine as well.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Popular tags from this forum

Similar threads

  • Question Question
Hi, I am trying to install a Radiology reporting related software as a Docker container running on...
Replies
0
Views
196
  • Solved
Hi all!!! I'm going to give a brief summary of the solution I've implemented to have a good backup of our...
Replies
43
Views
5,572
  • Question Question
Just to note the difference between the old Docker package and Container Manager: in Docker you can stop...
Replies
6
Views
4,127
  • Question Question
Welcome to the forum! Are you running those containers via their "project" files (YAML) or using the...
Replies
1
Views
718
I’m happy with what I’m doing. Use Portainer for tidying up and checking things, used to be more useful in...
Replies
6
Views
5,470
If I need to move my docker/container manager to another volume, I just do that and can run the composer...
Replies
9
Views
2,286

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending content in this forum

Back
Top