Httpd Config is not sticking

Questions about HTTP Access/Mods may go here
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/su ... p?lang=enu



2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
cravaus
Novice
Novice
Posts: 58
Joined: Wed Jul 02, 2014 6:12 pm

Httpd Config is not sticking

Unread post by cravaus » Mon Apr 04, 2016 10:32 pm

DSM 6 Has lots of good stuff but the adjustment is painful. In the past I would lock down my database and files with the following at the end of my httpd.conf-user :

Code: Select all


<VirtualHost *:80>
    Redirect permanent /~[user]/[website] https://www.[mydomain].com:443/~[user]/[website]
</VirtualHost>

 <Directory "/volume1/homes/[user]/www/[website]">
      AllowOverride FileInfo
  </Directory>
  <Directory "/volume1/homes/[user]/www/[website]/sites">
      AllowOverride None
  </Directory>
  <Directory "/volume1/homes/[user]/www/[website]/sites/*/documents">
      order deny,allow
      Deny from all
  </Directory>
  <Directory "/volume1/homes/[user]/www/[website]/sites/*/edi">
      order deny,allow
      Deny from all
  </Directory>
  <Directory "/volume1/homes/[user]/www/[website]/sites/*/era">
      order deny,allow
      Deny from all
  </Directory>


This no longer works. I have tried choosing Apache as my back end server in Web Station>General Settings> and then adding the string to /usr/local/etc/httpd/conf/httpd.conf but then it just disappears when I restart the NAS. I tried adding the string to a custom file here: /usr/local/etc/httpd/sites-enabled/httpd-vhost.conf and that did nothing. How can I get this to work again? Also, what is the command now to restart apache? I am just restarting the NAS for now.

cravaus
Novice
Novice
Posts: 58
Joined: Wed Jul 02, 2014 6:12 pm

Re: Httpd Config is not sticking

Unread post by cravaus » Tue Apr 05, 2016 6:15 am

The solution is to use the method I describe here: https://forum.synology.com/enu/viewtopi ... 64#p427283

Post Reply

Return to “HTTP/Apache Mods”