Go to your application directory and run this command, to run the server.
starman -I./lib --workers 1 --port 3000 myapp.psgi --log log/myapp.log --pid run/paxi.pid --daemonize
Confirm that the PSGI server is running on the server by visiting http://localhost:3000.
Add this to your Apache configuration file. On centOS, you will find it at /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
ServerAdmin email@myapp.com
DocumentRoot /var/www/vhosts/myapp
ServerName myapp.com
ErrorLog /var/log/httpd/error_log-myapp
CustomLog /var/log/httpd/access_log-myapp common
ProxyPreserveHost On
ProxyPass / http://0:3000/
ProxyPassReverse / http://0:3000/
</VirtualHost>
Now, you should be able to visit http://myapp.com from any browser.
starman -I./lib --workers 1 --port 3000 myapp.psgi --log log/myapp.log --pid run/paxi.pid --daemonize
Confirm that the PSGI server is running on the server by visiting http://localhost:3000.
Add this to your Apache configuration file. On centOS, you will find it at /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
ServerAdmin email@myapp.com
DocumentRoot /var/www/vhosts/myapp
ServerName myapp.com
ErrorLog /var/log/httpd/error_log-myapp
CustomLog /var/log/httpd/access_log-myapp common
ProxyPreserveHost On
ProxyPass / http://0:3000/
ProxyPassReverse / http://0:3000/
</VirtualHost>
Now, you should be able to visit http://myapp.com from any browser.
No comments:
Post a Comment