|
|
@@ -14,12 +14,35 @@ To run:
|
|
|
./app.py
|
|
|
```
|
|
|
|
|
|
-For Apache web server:
|
|
|
+### For Apache web server on Ubuntu with wsgi
|
|
|
|
|
|
-Insert the CustomBuild directory location for DocumentRoot and Directory below.
|
|
|
+* Install mod_wsgi for python 3:
|
|
|
+```
|
|
|
+sudo apt-get install libapache2-mod-wsgi-py3 python-dev
|
|
|
+```
|
|
|
+* In `app.wsgi`, specify the app directory (`.../CustomBuild/`).
|
|
|
+* Copy the config file to `/etc/apache2/sites-available/` and specify the correct directory, user and group.
|
|
|
+* Enable the file:
|
|
|
+```
|
|
|
+sudo a2ensite CustomBuild.conf
|
|
|
+```
|
|
|
+* Open `envvars`, and specify the user and group.
|
|
|
+```
|
|
|
+sudo vim /etc/apache/envvars
|
|
|
+```
|
|
|
+* To stop Apache:
|
|
|
+```
|
|
|
+sudo apache2ctl stop
|
|
|
+```
|
|
|
+* To start Apache:
|
|
|
+```
|
|
|
+sudo apache2ctl start
|
|
|
+```
|
|
|
+Webpage: 127.0.0.1/CustomBuild/
|
|
|
|
|
|
-Webpage: http://localhost:8080
|
|
|
+### Without wsgi
|
|
|
|
|
|
+Insert the CustomBuild directory location for DocumentRoot and Directory below.
|
|
|
```
|
|
|
DocumentRoot "CustomBuild directory location"
|
|
|
<Directory CustomBuild directory location>
|
|
|
@@ -30,9 +53,7 @@ DocumentRoot "CustomBuild directory location"
|
|
|
Require all granted
|
|
|
</Directory>
|
|
|
```
|
|
|
-
|
|
|
-To run server:
|
|
|
-
|
|
|
+To run the server:
|
|
|
```
|
|
|
/usr/local/opt/httpd/bin/httpd -D FOREGROUND
|
|
|
```
|