Can you post this on web2pyslices? Thanks you!
On Tuesday, 21 January 2014 09:37:46 UTC-6, 黄祥 wrote:
>
> just want to share, enjoy, n please let me know if you meet any problems
>
>
> Change :
> - Network Domain with your Network Domain Name
>
> - Server Name with your Server Name
>
> - Administrator Email Address with your Administrator Email Address
>
> - Change Path with your Own Path
>
> 1.
>
> Open Command Prompt (Start > Accessories > Command Prompt)
> 2.
>
> Download and Install Python Windows binary
> powershell -Command "(New-Object Net.WebClient).DownloadFile('
> http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi',
> 'C:\Users\sugizo\Desktop\python-2.7.6.msi')"
> C:\Users\sugizo\Desktop\python-2.7.6.msi
> 3.
>
> Download Apache 2.2 with ssl support
> powershell -Command "(New-Object Net.WebClient).DownloadFile('
>
> http://apache.mirrors.hoobly.com//httpd/binaries/win32/httpd-2.2.25-win32-x86-openssl-0.9.8y.msi',
>
> 'C:\Users\sugizo\Desktop\httpd-2.2.25-win32-x86-openssl-0.9.8y.msi')"
> C:\Users\sugizo\Desktop\httpd-2.2.25-win32-x86-openssl-0.9.8y.msi
> 4.
>
> Setting Apache during Installation
> Network Domain : domain.com
> Server Name : sugizo.domain.com
> Administrator Email Address : [email protected] <javascript:>
> 5.
>
> Download Mod WSGI Win32/Apache 2.2/Python 2.7
> powershell -Command "(New-Object Net.WebClient).DownloadFile('
> https://modwsgi.googlecode.com/files/mod_wsgi-win32-ap22py27-3.3.so',
> 'C:\Users\sugizo\Desktop\mod_wsgi.so')"
> 6.
>
> Download Web2py Source Code
> powershell -Command "(New-Object Net.WebClient).DownloadFile('
> http://www.web2py.com/examples/static/web2py_src.zip',
> 'C:\Users\sugizo\Desktop\web2py_src.zip')"
> 7.
>
> Extract Downloaded Web2py Source Code to
> C:\Users\sugizo\Desktop\web2py\web2py
> 8.
>
> Set Path Variables
> setx Path "%PATH%;C:\Python27\Scripts;C:\Python27\"
> 9.
>
> Backup and Edit Host File on C:\Windows\System32\drivers\etc\hosts
> copy C:\Windows\System32\drivers\etc\hosts
> C:\Windows\System32\drivers\etc\hosts_2
> notepad C:\Windows\System32\drivers\etc\hosts
>
> 127.0.0.1 localhost sugizo sugizo.domain.com
> 10.
>
> Create Certificate
> cd C:\Program Files\Apache Software Foundation\Apache2.2\bin
> openssl req -config ../conf/openssl.cnf -new -out ../conf/server.csr
> -keyout ../conf/server.pem
> openssl rsa -in ../conf/server.pem -out ../conf/server.key
> openssl x509 -in ../conf/server.csr -out ../conf/server.crt -req
> -signkey ../conf/server.key -days 3650
> 11.
>
> Copy Downloaded Mod WSGI Win32/Apache 2.2/Python 2.7 into Apache
> Modules
> copy "C:\Users\sugizo\Desktop\mod_wsgi.so" "C:\Program Files\Apache
> Software Foundation\Apache2.2\modules\mod_wsgi.so"
> 12.
>
> Backup and Edit Apache Configuration
> copy "C:\Program Files\Apache Software
> Foundation\Apache2.2\conf\httpd.conf" "C:\Program Files\Apache Software
> Foundation\Apache2.2\conf\httpd_2.conf"
> notepad "C:\Program Files\Apache Software
> Foundation\Apache2.2\conf\httpd.conf"
>
> Listen 80
> Listen 443
>
> LoadModule ssl_module modules/mod_ssl.so
> LoadModule wsgi_module modules/mod_wsgi.so
>
> NameVirtualHost *:80
> <VirtualHost *:80>
> DocumentRoot "C:/Users/sugizo/Desktop/web2py/web2py/applications"
> ServerName sugizo
>
> <Directory "C:/Users/sugizo/Desktop/web2py/web2py">
> Order allow,deny
> Deny from all
> </Directory>
>
> <Location "/">
> Order deny,allow
> Allow from all
> </Location>
>
> <LocationMatch "^(/[\w_]*/static/.*)">
> Order Allow,Deny
> Allow from all
> </LocationMatch>
>
> WSGIScriptAlias /
> "C:/Users/sugizo/Desktop/web2py/web2py/wsgihandler.py"
>
> </VirtualHost>
>
> NameVirtualHost *:443
> <VirtualHost *:443>
> DocumentRoot "C:/Users/sugizo/Desktop/web2py/web2py/applications"
> ServerName sugizo
>
> <Directory "C:/Users/sugizo/Desktop/web2py/web2py">
> Order allow,deny
> Deny from all
> </Directory>
>
> <Location "/">
> Order deny,allow
> Allow from all
> </Location>
>
> <LocationMatch "^(/[\w_]*/static/.*)">
> Order Allow,Deny
> Allow from all
> </LocationMatch>
>
> WSGIScriptAlias /
> "C:/Users/sugizo/Desktop/web2py/web2py/wsgihandler.py"
>
> SSLEngine On
> SSLCertificateFile conf/server.crt
> SSLCertificateKeyFile conf/server.key
>
> </VirtualHost>
> 13.
>
> Copy web2py wsgihandler.py
> copy C:\Users\sugizo\Desktop\web2py\web2py\handlers\wsgihandler.py
> C:\Users\sugizo\Desktop\web2py\web2py\
> 14.
>
> Copy web2py parameters_8000.py into parameters_80.py and
> parameters_443.py
> copy C:\Users\sugizo\Desktop\web2py\web2py\parameters_8000.py
> C:\Users\sugizo\Desktop\web2py\web2py\parameters_80.py
> copy C:\Users\sugizo\Desktop\web2py\web2py\parameters_8000.py
> C:\Users\sugizo\Desktop\web2py\web2py\parameters_443.py
> 15.
>
> Restart Apache Server
> sc stop Apache2.2
> sc start Apache2.2
> 16. Open your Browser and go to
> "C:\Program Files\Google\Chrome\Application\chrome.exe"
> http://localhost/welcome/default/index
> "C:\Program Files\Google\Chrome\Application\chrome.exe"
> https://localhost/welcome/default/index
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.