I'm trying to set up a website on my machine, and am having some trouble. I've prototyped the website using Flask and the debug server, and now would like to host it for a bit while I further debug it. This is only for internal use within my company network.
I cannot seem to get Apache configured correctly. I currently run a default site that links to my home directory, so I can grab files from other machines through a web browser.
I haven't changed my apache2.conf
at all, but here's my httpd.conf
<Location /server-status>
SetHandler server-status
Order Deny, Allow
Deny from all
Allow from .mycompany.com
</Location>
My default config, located within /etc/apache2/sites-available/default
, has
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinksMultiViews
AllowOverride None
Order allow,deny
allow from .mycompany.com
</Directory>
<Directory /var/www/home/>
Options Indexes FollowSymLinks MultiViews
AllowOVerride None
Order allow,deny
allow from .mycompany.com
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
While the app I'm trying to enable has the following config file, located at /etc/apache2/sites-available/Powermon
LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so
User p_user
Group p_group
FastCgiServer /home/p_user/Powermon/runp.fcgi -idle-timeout 300 -processes 5
<VirtualHost *:80>
ServerName powermon
DocumentRoot /home/p_user/Powermon/app/static
Alias /static /home/p_user/Powermon/app/static
AddHandler fastcgi-script fcgi
ScriptAlias / /home/p_user/Powermon/runp.fcgi
ErrorLog /home/p_user/Powermon/logs/powermon_error_log
<Location />
SetHandler fastcgi-script
</Location>
</VirtualHost>
Within sites-enabled I saw
000-default -> ../sites-available/default
So I added
010-powermon -> ../sites-available/Powermon
And when I run apache2ctl -S
I see
VirtualHost configuration:
wildcard NameVirtualHosts and _default_servers:
*:80 is a NameVirtualHost
default server dhcp-ip-address.mycompany.com (/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost dhcp-ip-address.mycompany.com (/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost powermon (/etc/apache2/sites-enabled/010-powermon:7)
Syntax OK
So currently when I go to machine-name/
in a browser, I can navigate my home directory and look at files as needed. Ideally I want to be able to go to machine-name/powermon
and see my app running.