Httpd aggravations

Questions about HTTP Access/Mods may go here
Forum rules
Please note the disclaimer before modifying your Synology Product.
grayfox
Novice
Novice
Posts: 46
Joined: Fri Nov 14, 2014 12:32 am

Httpd aggravations

Postby grayfox » Sat Mar 26, 2016 4:30 pm

I run two web based apps Moin and phpPgAdmin on my diskstation ( 214+ ). When I upgraded
to dms 6.0 they both broke.

Trying to find info on how to configure httpd is difficult since there seems to be no discussion in the release notes.

I had to do a system wide search for httpd.conf ( httpd-user.conf does not seem to exist any more). It turns out that the configuration directory is located in /use/local/etc/httpd.

I tacked two includes to the bottom of httpd.conf and put the files in the extra directory.
I restarted httpd and viola, stuff started working again. I went to bed...

I auto shutdown/startup and when I got up this morning the apps no longer worked.
It turns out that rebooting regenerates httpd so the two include statements got wiped.

I noticed there was a line in httpd :

Code: Select all

Include sites-enabled/*.conf

Near the bottom of httpd.conf..

I moved my two configuration files to this directory and rebooted

This time the configuration files were read and the apps came back to life.

It seems to me that there should have been some kind of README that told admins
How to get root ( login as an administrator and 'sudo -i') and how to deal with the
new layout of httpd and probably even more stuff as admins dive into the details.

What I just described actually took about ten hours of my life yesterday.
Frogy76
I'm New!
I'm New!
Posts: 1
Joined: Tue May 12, 2015 11:03 pm

Re: Httpd aggravations

Postby Frogy76 » Tue Mar 29, 2016 12:01 pm

Hallo greyfox

how did the conf file look like for phppgadmin?

I have the same problem with DSM 6

Best wishes

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

Re: Httpd aggravations

Postby cravaus » Mon Apr 04, 2016 3:47 am

I have tried placing my config modifications in sites-enabled but they disappear on reboot.
cravaus
Novice
Novice
Posts: 58
Joined: Wed Jul 02, 2014 6:12 pm

Re: Httpd aggravations

Postby cravaus » Tue Apr 05, 2016 1:02 am

A solution for the disappearing config file

The default file is found here: /volume1/@appstore/WebStation/misc/apache22.mustache

This is what loads the config file. Edits made here will stick through rebooting. I am sure there is a down side to this but I don't know what it is.
cravaus
Novice
Novice
Posts: 58
Joined: Wed Jul 02, 2014 6:12 pm

Re: Httpd aggravations

Postby cravaus » Tue Apr 05, 2016 6:02 am

I have also noticed that some .htaccess files still work (wordpress for example). But, if you switch to Nginx, they disappear. So, because I cannot figure out how to restart Apache, I have been using switching back and forth from Nginx to Appache. That is how I found out about the disappearance of the .htaccess files. But they also disappear if you restart the NAS. So, to keep make the .htaccess files stick around regardless of the situation I have changed their permissions to 0444. This works.

I have also noticed that .htaccess files redirecting to https do not work. This solution takes care of that:
https://forum.synology.com/enu/viewtopic.php?t=115182

So apparently Nginx and Apache intermingle here and there.
vlasto
I'm New!
I'm New!
Posts: 2
Joined: Sun Aug 24, 2014 1:25 pm

Re: Httpd aggravations

Postby vlasto » Sun Jul 17, 2016 3:19 am

Apart from editing existing conf file in their mustache templates, did anyone figure out how to make the additional *.conf files not disappear from sites-enabled?

Return to “HTTP/Apache Mods”

Who is online

Users browsing this forum: No registered users and 1 guest