I have somewhat of a NOOBIE question. I am using the 3-13-18 release of Stretch on a Raspberry Pi B+ with the latest release of apache2 loaded by sudo apt-get install apache2. I am setting up the weather station program Weewx. It locates its files, including index.html, in /var/www/html/weewx. Thus, the weather station is reached by address:port/weewx. I would like it to be reached directly by address:port. A quick Google of this task tells me to edit 000-default.conf within /etc/apache2/sites-enabled so that DoumentRoot points to my page (DocumentRoot /var/wwww/html/weewx). Simple enough, except it does not work. After saving this change and restarting apache2 or rebooting, I am still going to the original default index.html. I am at a loss as to what could be wrong. I suspect that apache2 has been revised and there are now other steps needed. I was not able to find anything useful in the manual. Can someone point me in the right direction (no pun intended)?
Is Weewx listening on a different port than Apache? If so, changing the DocumentRoot directory will not have an effect because the web server is not serving the requests to 'address:port/weewx'. In this case you can use mod_proxy to configure Apache as a reverse proxy so it can handle and pass the requests to your Weewx application. And you will be able to access the application at http:// address For example: ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://address:port/weewx/ ProxyPassReverse / http://address:port/weewx/ Code (markup):
Yup, that was it. Thank you. Actually I just changed the port back to 80. I only needed the initial testing at a different port.