Httpd Config is not sticking

Questions about HTTP Access/Mods may go here
Forum rules
We've moved! Head over to Synology Community (community.synology.com) to meet up with our team and other Synology enthusiasts!
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

Locked

Return to “HTTP/Apache Mods”