Replace Apache

Questions about HTTP Access/Mods may go here
Forum rules
Please note the disclaimer before modifying your Synology Product.

Replace Apache

Postby Xiode » Sun Jan 30, 2011 6:12 am

I was hoping someone from Synology could shed a little more light on this topic for me. I've been using my Syno 211 for pretty much every capability that it has (including hosting a website with the built-in "Web Services" functionality), but I've become increasingly fed-up with using Apache to serve up websites. I know that lighttpd is installed by default as well, and I was curious as to what switching web-server functionality to lighttpd completely and getting rid of Apache entails. Given limited system resources, Apache is just hogging too much memory / CPU utilization.

I'm planning on adding another HDD in the coming few days and I was planning on doing a full wipe / reformat anyway, so I'm looking to start fresh with a more lightweight installation this time!

Thanks for the help in advance!
Xiode
I'm New!
I'm New!
 
Posts: 3
Joined: Sun Jan 30, 2011 5:59 am

Re: Replace Apache

Postby Xiode » Wed Feb 02, 2011 2:13 am

Anyone?
Xiode
I'm New!
I'm New!
 
Posts: 3
Joined: Sun Jan 30, 2011 5:59 am

Re: Replace Apache

Postby malach1 » Thu Mar 31, 2011 7:32 pm

I disabled Apache on my DS111 and replaced with nginx, works well. I've used lighttpd also, not much difference. (Both using ipkg.)
malach1
Trainee
Trainee
 
Posts: 14
Joined: Thu Nov 25, 2010 4:59 pm
Location: KC, MO

Re: Replace Apache

Postby Xiode » Fri Apr 01, 2011 12:57 am

Is it as simple as disabling Apache and downloading nginx or lighttpd respectively? I assumed that there would be more to it than that, considering that the web administration pages are served up with Apache.
Xiode
I'm New!
I'm New!
 
Posts: 3
Joined: Sun Jan 30, 2011 5:59 am

Re: Replace Apache

Postby malach1 » Wed Apr 06, 2011 1:23 am

I'm sorry, I'm the worst at remembering to log on here. Anyway here's some of the stuff I came across. I'm by no stretch an expert so I don't want to get you into a mess, but this worked for me. First thing I did was follow directions I found on another site to move a bunch of startup scripts. I really only use my DS111 for a webserver and a network drive so I don't need most of the built-in apps. So, I created a new directory "rc.off" at /usr/syno/etc.defaults/. Moved scripts I didn't need from /usr/syno/etc.defaults/rc.d to the new directory, /usr/syno/etc.defaults/rc.off, so they don't start on reboot. Specific to the webserver stuff, I moved S97apache-sys.sh and S97apache-user.sh. So yeah as you mentioned the S97apache-sys.sh script will prevent the admin interface from running. When I need to use it I call it with "/usr/syno/etc.defaults/rc.off/S97apache-sys.sh start" and it will start up like normal, then I stop it again with "stop".

Another thing I changed is that the admin page listens on 5000, but it also redirects port 80 to 5000. That's at the bottom of the conf file at /usr/syno/apache/conf/httpd.conf-sys so I commented that part out.

# <IfDefine REDIRECT_USER>
# Listen DONT start at front
# Listen 80
# <VirtualHost *:80>
# RewriteEngine On
# RewriteRule ^/(.*)$ /usr/syno/synoman/redirect.cgi?5000
# </VirtualHost>
# </IfDefine>

I can't think of many other problems I ran into. (Aside from getting the webservers themselves running like I wanted.) The ipkg webservers will use the built-in MYSQL, or you can install the ipkg version which uses less memory on mine. (But it's version 4.) You could also only disable the apache-user script and leave your apache-sys alone, but I just didn't use it that often so I prefer to start it when I need it. I hope that helps, if you come across specific problems I can sure try and help if I came across the same.
malach1
Trainee
Trainee
 
Posts: 14
Joined: Thu Nov 25, 2010 4:59 pm
Location: KC, MO


Return to HTTP/Apache Mods

Who is online

Users browsing this forum: No registered users and 0 guests