How to add apache server configurations?

I’ve got a MyCloud Ex2 Ultra running the latest release of OS5. I noticed that apache is already installed but it seems to have nonstandard configuration. I’m wondering how I can add to the apache configuration so it statically serves one directory and also runs a GitWeb CGI script for serving information on my git repositories. I don’t need details for those, I just need to know where to go to edit apache configuration and how to make sure it’s running. thanks

ETA: I found it in /usr/local/apache2/conf/httpd.c

Hi @benwiley4000,

Have you opened a Support Case? If not opened, for more information, please contact the WD Technical Support team for the best assistance and troubleshooting:

I have a solution for this. Let’s say I have a file with additional apache server configuration for a specific route, called /mnt/HD/HD_a2/Nas_Prog/apache_extra_config :

# append extra config to end of httpd config
cat /mnt/HD/HD_a2/Nas_Prog/apache_extra_config >> /usr/local/apache2/conf/httpd.conf

# restart httpd
httpd -f /usr/local/apache2/conf/httpd.conf -k graceful

Note that this has to be redone whenever the machine reboots. See: Crontab on MyCloud EX2

1 Like

If you install Entware then you can write a script that will automagically apply your extra Apache settings after a reboot.

I have Entware installed but I’m unfamiliar with how this would work. Could you elaborate?

Hmmm… Hopefully the people running Entware are nice people, but there is no way to know. :frowning: