Synology DSM 5 web station and virtual sites for FileStation

Edit: For DSM 6, follow this: Reverse Proxy with DSM 6.0

I’ve upgraded my Synology DS 212+ to the latest DSM version, version 5, a few weeks ago.

Many things have changed on this new DSM version, and one of the things that changed, was the way Web station and Apache/PHP works.

The configuration files are different from the previous version 4 and they use now upstart to start and stop the service:

To stop the Web Station: /sbin/initctl stop httpd-user

To start the Web Station: /sbin/initctl start httpd-user

There is also a status command, to show the state of the server: httpd-user stop/waiting (Stopped) or httpd-user start/running, process #### (running)

For FileStation and Audio station, these application/sites normally expect the browser to connect to application ports, namely in my case the port 7000 and 7002. This has potentially two problems: I need to open them up on my home router to allow access, and sometimes I’m behind a proxy that doesn’t allow anything else to be used as a port on the url (except for port 80-HTTP or 443-HTTPS).

So I have these applications behind a reverse proxy on the WebStation. With this configuration I have my “normal” http address: http://primalcortex.somedomain.com and I also have http://filestation.primalcortex.somedomain.com and http://audio.primalcortex.somedomanin.com.

What is needed to achieve this? Well first a a dns server that accepts wirldcard domains. The Myds.me is one of them and is provided by Synology and directly integrated into the DSM.

Second a file like this is needed to be created:

<IfModule !proxy_module>
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
</IfModule>

ProxyRequests Off
 #ProxyPreserveHost On

NameVirtualHost *:80

#For File Station
 <VirtualHost *:80>
 ServerName filestation.mydomainname.myds.me
 <Location />
 RedirectPermanent / https://filestation.mydomainname.myds.me/
 </Location>
 </VirtualHost>

NameVirtualHost *:443

<VirtualHost *:443>
ServerName filestation.mydomainname.myds.me
SSLCipherSuite HIGH:MEDIUM
SSLProtocol all -SSLv2
SSLCertificateFile /usr/syno/etc/ssl/ssl.crt/server.crt
SSLCertificateKeyFile /usr/syno/etc/ssl/ssl.key/server.key
SSLEngine on
SSLProxyEngine on
ProxyRequests Off
ProxyVia Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:7000/
ProxyPassReverse / http://localhost:7000/

</VirtualHost>

(In case something is missing above due to WordPress formating issues see this ->
http://pastebin.com/C7WF8kTN)

Save this file as httpd-FILESTATION-vh.conf-user at /usr/syno/etc

Then add the following line at the end of this file /etc/httpd/conf/httpd.conf-user

Include /usr/syno/etc/httpd-FILESTATION-vh.conf-user

Repeat for other sites like Audio Station, changing the hostname and the localhost port.

You can now run the following command: /usr/syno/etc/rc.sysv/httpd-user-conf-writer.sh and check if the above include is added to the /etc/httpd/conf/httpd.conf file. This file is always regenerated at start of the Web Station.
Now we can restart the web station with /sbin/initctl stop httpd-user followed by the start command.

Check now if you can access the url: https://filestation.mydomain.myds.com

Edit: This works for version 5.0-4482

For more recent versions you need also to do the following:

Edit file /etc/httpd/conf/extra/httpd-ssl.conf-user and comment out the ServerName and ServerAlias like this

#ServerName *
#ServerAlias *

Save the files, write again the configuration (/usr/syno/etc/rc.sysv/httpd-user-conf-writer.sh), stop ( /sbin/initctl stop httpd-user) and start again ( /sbin/initctl start httpd-user), and it should work now.

Thanks for Markus (below at the comments for the solution) and Tensai for corrections.

EDIT: we can make all this setup to be done automatically, even between DSM upgrades. Thanks to Michi (see below) for his script: http://pastebin.com/raw.php?i=rjrU6X8K.

Just copy the content from the above link, and paste it into a file named, for example S99subdomains.sh in directory /usr/local/etc/rc.d

Make sure that the file is executable with the following command: chmod +x S99subdomains.sh and just run it: S99subdomains.sh start.

That’s it. Also just make sure that on DSM web interface the applications on Control Panel -> Application Portal have HTTP ports assigned that are coincident with those defined in the above file. Otherwise an Internal error 500 appear when trying to access the web page because Apache will try to forward the request to a non listening port.

81 thoughts on “Synology DSM 5 web station and virtual sites for FileStation

  1. Thanks for this post. It was very helpful. It works for me on DSM 5. However, after a fresh reboot of my synology NAS I have to stop and start the webserver to get it working again. Any ideas why this doesn not automatically happen when the NAS boots up?

    1. It also happens, sometimes to me. Not sure why.

      I’ve solved by configuring crontab with a little script to check if the web server is up, and if not to start it.

      I’ll get that for you.

  2. Note that there is a missing “d” in the first file name after http so it matches the file name listed later: (should be “Save this file as httpd-FILESTATION-vh.conf-user”

    Save this file as http-FILESTATION-vh.conf-user at /usr/syno/etc

    Then add the following line at the end of this file /etc/httpd/conf/httpd.conf-user

    Include /usr/syno/etc/httpd-FILESTATION-vh.conf-user

  3. Hello.

    For some reason the first part works (I get redirected to the https) but then the browser shows the default webstation page and not the filestation login page. For example I get the same page for https://whatever.domain.com.

    Direct entry of http://domain.com:7000 works.

    here is the file content :

    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_connect_module modules/mod_proxy_connect.so
    LoadModule proxy_http_module modules/mod_proxy_http.so

    ProxyRequests Off
    #ProxyPreserveHost On

    NameVirtualHost *:80

    #For File Station

    ServerName filestation.domain.com

    RedirectPermanent / https://filestation.domain.com/

    NameVirtualHost *:443

    ServerName filestation.domain.com
    SSLCipherSuite HIGH:MEDIUM
    SSLProtocol all -SSLv2
    SSLCertificateFile /usr/syno/etc/ssl/ssl.crt/server.crt
    SSLCertificateKeyFile /usr/syno/etc/ssl/ssl.key/server.key
    SSLEngine on
    SSLProxyEngine on
    ProxyRequests Off
    ProxyVia Off

    Order deny,allow
    Allow from all

    ProxyPass / http://localhost:7000/
    ProxyPassReverse / http://localhost:7000/

    Thanks a lot !

      1. Hi.

        Yes the include line is there.
        Neither http://filestation.domain.com:7000 or https://filestation.domain.com:7000 works.
        I also tried with http://www.google.fr, it doesn’t work either.

        It is all just as if the second part of the file is ignored or overruled by something.

        Below is what I use to be abble to access my DS anyway.
        I added extra spaces to try to save formatting when posting here.
        I mixed your tutorial with another found online (especially for the top of the file)
        It works but it is plain http, no ssl.

        LoadModule proxy_module modules/mod_proxy.so

        LoadModule proxy_connect_module modules/mod_proxy_connect.so

        LoadModule proxy_http_module modules/mod_proxy_http.so

        #LoadModule ssl_module modules/mod_ssl.so

        NameVirtualHost *:80

        ServerName filestation.domain.com
        ProxyRequests Off
        ProxyVia Off

        Order deny,allow
        Allow from all

        ProxyPass / http://localhost:7000/
        ProxyPassReverse / http://localhost:7000/

        I would really like to get your solution working.
        What do you suggest ?

        Thanks a lot !

      2. Hi.

        Yes the include line is there.
        Neither http://filestation.domain.com:7000 or https://filestation.domain.com:7000 works.
        I also tried with http://www.google.fr, it doesn’t work either.

        It is all just as if the second part of the file is ignored or overruled by something.

        Below is what I use to be abble to access my DS anyway.
        I added extra spaces to try to save formatting when posting here.

        EDIT : doesn’t work => here : http://pastebin.com/Z18PLi8F

        I mixed your tutorial with another found online (especially for the top of the file)
        It works but it is plain http, no ssl.

        LoadModule proxy_module modules/mod_proxy.so

        LoadModule proxy_connect_module modules/mod_proxy_connect.so

        LoadModule proxy_http_module modules/mod_proxy_http.so

        #LoadModule ssl_module modules/mod_ssl.so

        NameVirtualHost *:80

        ServerName filestation.domain.com
        ProxyRequests Off
        ProxyVia Off

        Order deny,allow
        Allow from all

        ProxyPass / http://localhost:7000/
        ProxyPassReverse / http://localhost:7000/

        I would really like to get your solution working.
        What do you suggest ?

        Thanks a lot !

      3. Hi:

        So when using http, it works (with the above configuration file), and when using https (using the configuration file with the https section), it doesn’t?

        My configuration: http://pastebin.com/C7WF8kTN

        This works for me.

  4. Sorry, some text went missing after submitting the comment.
    My point is I just copy-pasted the text from the article and changed the domain name.

  5. Pinet,

    I was having the same issue. I had to go in and edit /etc/httpd/conf/extra/httpd-ssl.conf-user. I commented out everything except

    Listen 443
    Include conf/extra/httpd-ssl.conf-common

    And it’s working as expected for me now. This probably kills WebStation, but that’s fine for me.

    1. I’ve modified nothing on that file (httpd-ssl.conf-user), and the configuration that I’ve posted works for me…

      But indeed I’m puzled why it doesn’t work for people…

  6. Up to Version 5.0-4482 this solution is working fine. With 5.0.-4493 Synology add the entries “servername *” and “serveralias *” in httpd-ssl.conf-user. This will break the solution. Just commented out this two lines and it works again ๐Ÿ˜‰ Do not forget to activate Perfect Forward Secrecy if you are “playing” with SSL……(check your site via: https://www.ssllabs.com/ssltest/)

  7. Thanks for the great post and walkthrough. works like a charm!
    very clear and effective.
    was looking to do it since years.
    Also thanks to markus for solving last issue.

    1. Hi:
      Not sure why you have that behaviour… Are you sure that the RedirectPermanent line is correct?

      What is your Dynamic DNS provider? Mine is myds.me, and it works fine.

      1. OK I will check the RedirectPermanent Directive.
        I do not use a dynamic redirection since I have a fixed private ip.
        TX
        Regards

  8. A correction for those with newer DS version:

    You need to comment out the ServerName and ServerAlias in the httpd-ssl.conf-user file, because the httpd-ssl.conf file gets overwritten at every restart of the apache-user.
    And BTW, the file is in conf/extra and not conf/extras

    File to edit:

    /etc/httpd/conf/extra/httpd-ssl.conf-user

    Changes:

    #ServerName *
    #ServerAlias *

  9. Hi There,

    Many thanks for the instruction about restarting Apache service on the NAS. Since 5.0 there are a lot of inconvieniant changes ๐Ÿ˜ฆ
    I also have a Synology NAS, a 214+. Using DSM 5.0-4493 update 3. I try to setup SSI, but whitout succes. Hope that you can help me with this.

    Regards,
    John

      1. Hi there,

        I did follow the instructions. But I use html and php files in the same site. For the HTML it looks like it works. But for the PHP file it does not.
        I have tried to add the php extension to the option parameters, but that has no change of results.

        In the PHP files, the html includes does not work, while the php include does. In the html, the shtml include work good.

        Regards,
        John

      2. for your convenience please look at http://www.johnanddesi.nl. You will see a complete home page. When you choose CONTACT in the menu, you will see a partial page with HTML and PHP items but without any styling, menu, headers and footers. Those are in the include shtml files. The same as from the home page.

  10. Hi:

    I’m not sure if shtml file can be included from php files. The reason that I think is not possible is that shtml files is handled by Apache server itself, and PHP by the PHP handler. This means that PHP to parse shtml files needs to call Apache, but PHP itself is already called by Apache… I may be wrong, never had this kind of situation, so I really don’t know any available solution. Searching Google only gives results on including PHP in shtml files not the other way around.

  11. This is already about the 3x that the adapted vhosts / SSL / reverse proxy configuration (currently: 5.0-4493 Update 4) doesn’t work after the update. SYNOLOGY !!!!!

    1. Well, being doing other stuff, I failed to notice that an update, namely Update 4 had came out.

      It did the upgrade, and it didn’t, in my case (YMMV) my configuration files.

  12. This article has already saved my a** like dozens of times… thanks a lot… BTW if you ever dare to remove it, rest assured I’ll find you ^^

  13. Iยดve putted everything together in a script, which checks on every bootup if all subdomains are there. Even after a sytemupdate it will work.

    Just put the code in a script and name it something like “S99Subdomains.sh”. Make it executable and place it in “/usr/local/etc/rc.d”

    #!/bin/sh
    #You must change this variable to suit your hostname
    #----------------------------------------------------
    URL="YOURDOMAIN.com" #The main URL of the site
    #----------------------------------------------------

    #Clear your browsers cache!!!

    #Normally you do not have to change these variables
    httpconfig="/etc/httpd/conf/httpd.conf-user"
    startApache="/sbin/initctl start httpd-user"
    stopApache="/sbin/initctl stop httpd-user"

    redirectSubdomainTo()
    {
    #Create the Reverse Proxy File
    echo "

    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_connect_module modules/mod_proxy_connect.so
    LoadModule proxy_http_module modules/mod_proxy_http.so

    ProxyRequests Off
    #ProxyPreserveHost On

    #For Subdomain $1
    NameVirtualHost *:80

    ServerName $1.$URL

    RedirectPermanent / https://$1.$URL/

    NameVirtualHost *:443

    ServerName $1.$URL
    SSLCipherSuite HIGH:MEDIUM
    SSLProtocol all -SSLv2
    SSLCertificateFile /usr/syno/etc/ssl/ssl.crt/server.crt
    SSLCertificateKeyFile /usr/syno/etc/ssl/ssl.key/server.key
    SSLEngine On
    SSLProxyEngine On
    ProxyRequests Off
    ProxyVia Off
    ProxyVia Off

    Order deny,allow
    Allow from all

    ProxyPass / http://localhost:$2/
    ProxyPassReverse / http://localhost:$2/

    " > /usr/local/etc/httpd-"$1"-vh.conf-user

    if grep "/usr/local/etc/httpd-$1-vh.conf-user" $httpconfig;
    then
    /usr/syno/bin/synologset1 sys info 0x11800000 "subdomain $1 is running"
    else
    echo "Include /usr/local/etc/httpd-$1-vh.conf-user" >> $httpconfig
    /usr/syno/bin/synologset1 sys info 0x11800000 "Created subdomain $1"
    fi
    }

    case $1 in
    start)

    $stopApache

    sed -i 's/ ServerName/# ServerName/' /etc/httpd/conf/extra/httpd-ssl.conf-user
    sed -i 's/ ServerAlias/# ServerAlias/' /etc/httpd/conf/extra/httpd-ssl.conf-user

    redirectSubdomainTo audio 8800
    redirectSubdomainTo dsm 5000
    redirectSubdomainTo file 7000
    redirectSubdomainTo note 9350
    redirectSubdomainTo video 9007

    /usr/syno/etc/rc.sysv/httpd-user-conf-writer.sh

    $startApache

    ;;
    stop)
    # No need for doing anything
    ;;
    *)
    echo "Usage: $0 [start|stop]"
    ;;
    esac

    1. Looks great, and at least it seems to automate the process of configuration and reconfiguration.

      I’ve haven’t try it yet, but I will.

      Thanks for the input! ๐Ÿ™‚

    2. Hi, thanks for this but I’m not being able to make it run.
      I’ve placed the .sh file in โ€œ/usr/local/etc/rc.dโ€, made it executable (chmod +x) and stopped/started the httpd-user process. I’ve looked through the httpd config files and those seem to remain unaltered.
      I’m probably missing something here.
      Also, trying to run the script from shell returns this:

      sh S99Subdomains.sh
      start: Unknown job: httpd-user
      stopApache=/sbin/initctl
      S99Subdomains.sh: line 19: LoadModule: not found
      S99Subdomains.sh: line 20: LoadModule: not found
      S99Subdomains.sh: line 21: LoadModule: not found
      S99Subdomains.sh: line 23: ProxyRequests: not found
      S99Subdomains.sh: line 27: NameVirtualHost: not found
      S99Subdomains.sh: line 29: ServerName: not found
      S99Subdomains.sh: line 31: RedirectPermanent: not found
      S99Subdomains.sh: line 33: NameVirtualHost: not found
      S99Subdomains.sh: line 35: ServerName: not found
      S99Subdomains.sh: line 36: SSLCipherSuite: not found
      S99Subdomains.sh: line 37: SSLProtocol: not found
      S99Subdomains.sh: line 38: SSLCertificateFile: not found
      S99Subdomains.sh: line 39: SSLCertificateKeyFile: not found
      S99Subdomains.sh: line 40: SSLEngine: not found
      S99Subdomains.sh: line 41: SSLProxyEngine: not found
      S99Subdomains.sh: line 42: ProxyRequests: not found
      S99Subdomains.sh: line 43: ProxyVia: not found
      S99Subdomains.sh: line 44: ProxyVia: not found
      S99Subdomains.sh: line 46: Order: not found
      S99Subdomains.sh: line 47: Allow: not found
      S99Subdomains.sh: line 49: ProxyPass: not found
      S99Subdomains.sh: line 50: ProxyPassReverse: not found
      S99Subdomains.sh: line 86: syntax error: unterminated quoted string

      1. You may have copied the file with some errors in it. Delete your file and copy the contents from here: http://pastebin.com/raw.php?i=rjrU6X8K. It’s my script and it works. It is the same that is above in the comments. The WordPress comments system cut some symbols that are needed to the file to work on the above comment, so that’s why you are having trouble.

      2. Thanks, that sorted it out. I still have an issue though, I can’t log in using the DS apps on mobile devices… Any idea why?

      3. Only port 80 and 443 should be open on the router, for this virtual site configuration to work. But this is only for the web based clients.
        For mobile applications I recommend that you register at QuickConnect Id. That Id, not an IP or DNS name, is to be used on the mobile applications, in which case the other ports (7000, 9000, and so on) do not need to be open.
        Just go to Control Panel -> Quick Connect and register your ID. And that’s it. Just make sure which applications can use this quick connect ID.

      4. I found that I can only login on mobile apps with port 5001 (I’m forcing https connections) forwarded on my router. Is there any way of avoiding having this port open?

      5. Sorry for the breadcrumb comments… To get the video mobile apps actually streaming video, por 9007 also needs to be open on my router.

      6. There is one use though that is unavailable through quickconnect that is DS Video apps on Samsung TVs, that one doesn’t recognize that as an authentication method.

  14. Thank you for posting this!
    I was pulling the bit of hair I have left since I had configured virtual hosts on the first DSM 5.0 update then they killed my configuration on the newest update.
    I noticed the script in the comments section and will give it a few modifications (I host couchpotato, sickbeard, sabnzbd, etc) for what I need.

    Thanks again for this awesome post!

  15. Followed this guide and now my NAS is f**ked, I can’t even access the DSM locally. Anyone got any idea how I can undo the damage done?

    1. Hi:

      Did you made a backup of the files that where going to be changed? If yes, just copy them over.

      Otherwise I’m not sure what you did, so I can only provide some guide lines to solve the issue.

      First access the NAS through ssh and check what errors might exist in the error files located at /var/log/httpd. These files might give a clue what is wrong.

      You can also from the shell try to start up the manually the Apache server. The changes on this post DO NOT MAKE any changes on the DSM Administrative site of the NAS. So make sure that you can start it with /sbin/initctl start httpd-sys, other wise something else is wrong and you might have change some file used by the Administrative console Apache.

      Also you can just delete the changes on the files that you’ve made.

  16. I cant even access the NAS via SSH, I’ve had to pull out my hard drives and re-install the OS entirely. I still have my content but all OS settings e.g. users etc is lost. I didn’t think doing something like this would be so risky!

    I’m not sure where I went wrong, I was simply following the guide. Perhaps it would be worth re-writing the instructions so they’re only specific to the latest update?

    1. These changes do not:

      – Mess with ssh or any configuration files of ssh.
      – Mess with web configuration for the administrative interface
      – Mess with anything not related to web station user related.
      – It’s not supported or endorsed by Synology, partners or affiliates

      – It is a modification that does change configuration files and involves risk if a person is unable to troubleshoot a failed apache server.

      – The instructions are correct even for the latest version.

      – Any changes should be made after backups are done of the files that we are going to change

      Sorry for your trouble but I do not believe that the issue that you had, namely the ssh issue, has anything to do with these instructions.

  17. Humm, well when I run the first command you reference:
    /sbin/initctl stop httpd-user

    I get:
    initctl: Name “com.ubuntu.Upstart” does not exist

    1. How do you access your NAS?
      What is your DSM version?

      What is the output of the following command: uname -a

      It seems that you are running the command in your local machine??

  18. For this task I’m accessing my NAS using putty.

    Im running version DSM 5.1-5022

    The command you mentioned returns:
    Linux Apollo 3.2.40 #5022 SMP PREEMPT Wed Jan 7 14:19:42 CST 2015 i686 GNU/Linux synology_evansport_214play

    1. Ahhh, Ok. You seem to have an Atom based NAS with Kernel 3.2 while I have an older ARM based NAS woth Kernel 2.

      Check out the directory /etc/init.d for the initializing scripts. it might have some http* scripts there and the error that you have might be due to different service names on your Linux version.

    1. The problem is that I’m already at version 5.1-5022 and the above instructions work fine, including the initctl command. But my NAS is a DS212+ and it’s ARM based and uses a older version of Linux… as your NAS seems to be much more recent and is using a more recent version of the Linux operating system, that probably doesn’t use initctl but something else (systemd?). I have no access to a new system as yours, so I can’t really help you on the exact commands to be given to start and stop the user level Apache server. Regarding the files they might be the same, since DSM version is the same, but it also might differ from my NAS.

  19. It is almost working good, but what’s still not working is the redirection from http to https. When I do http://mysubdomain.CHANGEME.COM I expected that it would be rerouted to https://mysubdomain.CHANGEME.COM. But that’s not.

    I changed a few things in the script. Now I have the possibility to redirect to other servers within my home. Also added the possibility for different SSL key’s for every subdomain (necessary for startssl.com)

    SSLCertificateFile /usr/syno/etc/ssl/ssl.crt/$1.crt
    SSLCertificateKeyFile /usr/syno/etc/ssl/ssl.key/$1.key

    ProxyPass / http://$2:$3$4
    ProxyPassReverse / http://$2:$3$4

    redirectSubdomainTo pi 10.0.0.12 8080 /

    That will make a ProxyPass / http://10.0.0.12:8080/ = another server than localhost

    Has someone the reroute to https working?

    1. Did you do the redirection inside the VirtualHost directive for every domain?

      Also did you tried with another browser?

  20. I used the script. For every domain there is now a redirection from mydomain.changeme.com to https:// mydomain.changeme.com like:

    ServerName mydomain.changeme.com

    RedirectPermanent / https://mydomain.changeme.com/

    I tried IE, firefox and chrome. But didn’t work for any. So my problem seems to be in the conf files.

    1. Ok. Browsing the documentation it seems that the correct syntax is as follows
      Redirect permanent / https://

      Just add a space between the redirect directive and the permanent keyword.

    1. Since I have port 80 blocked from the exterior to my DS (I’m only allowing HTTPS connections to pass through the router), I don’t use the http protocol and then the redirect. Anyway, I changed my network configuration, and at least for me, the redirec works from http to https when using the directive Redirect Permanent

      So I’m not sure what’s happening with your configuration… Any errors on Apache logs? Can you do a packet trace from the browser with WireShark to see what is the answer coming from the Apache server?

  21. I have issues running the webstation since a recent minor upgrade on 5.1. I can host HTML files, but PHP is displayed in plain text. I’ve copied the default httpd.conf-user and added there only DocumentRoot “/var/services/web”, but still no luck. The Webstation config in the DSM is totally broken as it throws a blank popup with OK whenever I try to start the WS. I’m able to run it command line using /usr/bin/httpd -DPHP -f /etc/httpd/conf/httpd.conf-user but that does not allows to run PHP files.

    1. Hi:

      I’ve done a small test, on my NAS that is also is running the latest patch, and php files run just fine.
      Some things to check:
      – Is the extension of the file .php?
      – Are you using short or long tags to embed php commands?

      1. The file is .php and has worked before. My /var/log/messages shows the following when trying to start Webstation from the DSM.

        May 6 17:49:40 server synonetd: base_hook.cpp:73 Hook environment is not valid
        May 6 17:50:33 server entry.cgi_SYNO.Core.Web.HTTP[1].set[28658]: servicecfg_internal_lib.c:220 Failed to start job [webstation-httpd-conf-writer][0x4000 servicectl_status.c:42]
        May 6 17:50:33 server entry.cgi_SYNO.Core.Web.HTTP[1].set[28658]: service_initjob_action.c:27 InitJobStart failed, [0x4000 servicectl_status.c:42]
        May 6 17:50:33 server entry.cgi_SYNO.Core.Web.HTTP[1].set[28658]: web_start_web_station.c:32 SYNOWebService(enable) failed[0x0D00 string_sep_pair.c:54]
        May 6 17:50:33 server entry.cgi_SYNO.Core.Web.HTTP[1].set[28658]: webstation_http_service.cpp:122 SYNOWebStationStart failed
        May 6 17:54:59 server entry.cgi_SYNO.Core.Web.HTTP[1].set[29272]: servicecfg_internal_lib.c:220 Failed to start job [webstation-httpd-conf-writer][0x4000 servicectl_status.c:42]
        May 6 17:54:59 server entry.cgi_SYNO.Core.Web.HTTP[1].set[29272]: service_initjob_action.c:27 InitJobStart failed, [0x4000 servicectl_status.c:42]
        May 6 17:54:59 server entry.cgi_SYNO.Core.Web.HTTP[1].set[29272]: web_start_web_station.c:32 SYNOWebService(enable) failed[0x0D00 string_sep_pair.c:54]
        May 6 17:54:59 server entry.cgi_SYNO.Core.Web.HTTP[1].set[29272]: webstation_http_service.cpp:122 SYNOWebStationStart failed

      2. Wow, Sorry, I’m afraid I’m unable to help you… It seems that the configuration file for the service has some problem, hence the service starts to fail. I’ll try my best to debug this…

        The first error referes to the servicecfg and also mentions webstation-httpd-conf-writer.

        So it seems that base configuration that is needed to build the web station files has some problems. You can run the command /usr/syno/etc/rc.sysv/httpd-user-conf-writer.sh to write the configuration files. I think this command is failing. Also there is this error: [0x0D00 string_sep_pair.c:54], not sure what is that, but seems to be refering some missing pair of “” or ” .
        Check and double check again your configuration file.

      3. I managed to start the Webstation httpd again through command line: /usr/bin/httpd -DSSL -DHAVE_PHP -f /etc/httpd/conf/httpd.conf
        Running /usr/syno/etc/rc.sysv/httpd-user-conf-writer.sh was still working. (I did not check if values were still taken from /etc/synoinfo.conf for HTTPS port e.g.) So the error must be somewhere between where you click in the DSM and how this is translated into a system call to start the Webstation server. It seems that an error is encountered which has no catch or error message, that is fed back into the DSM.
        From what I’ve read on the internet, more people seem to modify the httpd.conf & start it manually from the command line, because of conflicts with the DSM way of working.

  22. hello,
    I followed your tuto, everything looks fine but when I try to connect get
    You don’t have permission to access / on this server
    I cannot figure what happen
    Thx

      1. Hi,
        No, the default web site works like a charm.
        This error occur only if I use the virtual server name.

      2. Is the virtual server name pointing to a web server directory or is a reverse proxy to another service? If it’s the first case, it might be that the directory/file does not have the correct permissions to be read/accessible by the httpd server.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.