Apache 2.4 on DS218+

Currently reading
Apache 2.4 on DS218+

I'd like to run Apache server on my DS218+. I need it only inside the home network. I don't need Wordpress/Joomla etc.
I only need Apache for presentation a simple static content.
I have experience with AIX and running Apache.
I installed package Apache 2.4, Web station say Apache is running, I see some Apache processes:
ps -ef|grep http
root 18277 1 0 Oct29 ? 00:00:02 /var/packages/Apache2.4/target/usr/local/bin/httpd24
http 18467 18277 0 Oct29 ? 00:00:00 /var/packages/Apache2.4/target/usr/local/bin/httpd24
http 18570 18277 0 Oct29 ? 00:00:00 /var/packages/Apache2.4/target/usr/local/bin/httpd24

But I do'nt know where is DocumentRoot of Apache. Synology support claims that -> /volume1/web
I have inside this dir:
DS218:/volume1/web$ ls -l
drwxrwxrwx+ 1 root root 8 Oct 25 21:01 @eaDir
-rwxrwxrwx+ 1 http http 1474 Oct 25 21:01 index.html

I try to responce of Apache...
wget --spider -O - http://localhost/index.html
I receive this:
Spider mode enabled. Check if remote file exists.
--2019-10-30 19:23:49-- http://localhost/index.html
Resolving localhost...
Connecting to localhost||:80... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
--2019-10-30 19:23:50-- (try: 2) http://localhost/index.html
Reusing existing connection to localhost:80.
HTTP request sent, awaiting response... 500 Internal Server Error
Remote file does not exist -- broken link!!!

Synology support couldn't advise me.
Somebody will advise me here, what I doing wrong?
Hi roze

I should start by saying I don’t know much about web servers but I’ve managed to run a simple website by using web station and Apache 2.2.
In my case everything went under a folder called Web (when you run FileStation you should see it). It’ll be your NAS name and then among the folders should be “web”.
Under web, I have folder “CSS” where all the CSS files went when I used my web publishing application to do the magic.

Not sure if this helps. If not, more knowledgeable members will surely jump in.
Come to think of it. Maybe the folder “web” was created by the publishing software.
I just played stupid and directed my web design software to my NAS with the following settings and it worked. In fact I was surprised when it did :D

Last edited:
The default shared folder for Web Station document root is /web.

In Web Station you can set it's default engine nginx, Apache 2.2, or Apcahe 2.4 (if installed). Also you can configure virtual hosts that can have their own engines and doc root in any other folder on the NAS.

My setup has Web Station redirecting HTTP to HTTPS though where I set this I have absolutely forgotten (for 01:30 and I'm tired). In Control Panel / Network / DSM Settings it says that the HTTP-to-HTTPS setting on that page doesn't affect Web Station, yet I can't at-the-mo find where else it was set.


Found my redirect, it's in the top-level .htaccess file ...

Apache config:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Yes. That’s it. @fredbert explanation is better and more “scientific”. I did the rewrite directives in .htaccess too at the time.

I found a web development application called Sparkle (I think it’s Mac only), that was absolutely a delight to use to build our simple content site (might be useful to someone stumbling on this thread). Just be careful if you go for the basic license, you can only publish to a single site.
Thank you for all the advice. First I checked the existence and content of shared folder /web.
I want to use Apache 2.4 because v.2.2 is deprecated.
I don't need PHP, but Web station says 'Default server status: Abnormally' until I installed PHP (I choose 7.3).
Then Web station changes 'Default server status:' to Normal.

I found the location of Apache 2.4 conf file (/var/packages/Apache2.4/target/usr/local/etc/apache24/conf/httpd24.conf).

I found out also the location of the Apache error log (/var/packages/Apache2.4/target/usr/local/etc/apache24/logs/apache24-error_log).

during Apache startup from Web station I see in this error log message:
2019-11-09T16:23:07+01:00 DS218 [Sat Nov 09 16:23:07.741610 2019] [core:alert] [pid 528:tid 140265219294976] [client] /var/services/web/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration

=> DocumentRoot in may case is not in /volume1/web
but in /var/services/web/

I renamed (blocked use) of /var/services/web/.htaccess and voila ...
wget -O - http://localhost
respectively out of my DS218:
wget -O - http://ds218.local
works :)

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.

Similar threads

  • Question
I am new to Synology Web Station. I have a static IP address. I have 4 domains. I have the router port...
Welcome to the forum. I am guessing that you have selected Apache 2.2 as one of the server backend types...
This wasn't mentioned as fixed in the release notes of WebStation 4.2.1-0492, and it wasn't. Reapplied the...
  • Question
I need to run some php scripts on my Synology. These scripts have a long exectution time, usually they...
I have never used NGINX before, I don't think it is supported by Wikitrees. I can look into it though.
I am my migrating an Apache website to my Synology NAS. A portion of the website needs to be password...

Welcome to SynoForum.com!

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

Registration is free, easy and fast!

Trending threads