Paolo, Thank you again.
>so it's simple compare it with your, downloading uniform server (that >is portable and install less) I will try uniform server next monday and tuesday, then update the result here. On Oct 9, 2:46 am, Paolo Caruccio <paolo.carucci...@gmail.com> wrote: > My enviroment > windows7 64 bit > Apache/2.2.21 (Win32) DAV/2 mod_ssl/2.2.21 OpenSSL/1.0.0e mod_wsgi/3.3 > Python/2.7.2 PHP/5.3.8 > pywin32-216.win32-py2.7 > pyodbc-2.1.11.win32-py2.7 > web2py 1.99.2 stable > db2exc_974_WIN_x86_64 - IBM DB2 Express-C > > httpd.conf is the same as that one comes with uniform server, I only > added to it two rows: > # to load mod_wsgi > LoadModule wsgi_module modules/mod_wsgi.so > # vhost_web2py is a separated file (see my previous message for its > content) > Include conf/vhost_web2py.conf > > so it's simple compare it with your, downloading uniform server (that > is portable and install less) > > Regarding db2 driver after I installed IBM DB2 Express-C I made the > following steps: > > 1) in db2 control center I created a new empty database and named it > "TEST" alias "TEST" > 2) activated IBM DB2 ODBC DRIVER : > 2a) in win7 control panel > administrative tools > Data Sources > (ODBC) > 2b) in opened window > tab "User DSN" > "Add" button > 2c) in new popup window select "IBM DB2 ODBC DRIVER" > "End" button > 2d) in next window > 2d1) Data Name Source = "TEST" > 2d2) Database alias = "TEST" > 2d3) Pressed OK button > > In web2py I created a new simple application and connected to database > through the string: > > db = DAL('db2://DSN=TEST;UID=userid;PWD=password') > > where userid and password are the same as accessing to IBM DB2 Express- > C. > > At the end I succesfully registered a new user, so all worked fine for > me. > > Ciao. > Paolo > > On 7 Ott, 21:31, Omi Chiba <ochib...@gmail.com> wrote: > > > > > > > > > Paolo, > > > You gave me a hope because it looks you tried it recently and it's > > very similar to my environment. (Is your OS Windows 7, XP, or Windows > > Server ??) > > > My environment: > > OS: Windows 7 SP1 - 32bit > > Python: 2.7.2 > > Apache: httpd-2.2.21-win32-x86-openssl-0.9.8r.msi > > mod_wsgi: mod_wsgi-win32-ap22py27-3.3.so > > pyodbc: pyodbc-2.1.11.win32-py2.7.exe > > pywin32: pywin32-216.win32-py2.7.exe > > > I was keep thinking what makes the difference. I know you use Uniform > > Server but > > the version of apache included is the same as mine. So it should be > > the same. > > > Only possible difference is an apache config, The below is the part of > > httpd.conf let me know if you find anything wrong. It's running fine > > except pyodbc cannot make connection to mssql/db2 under wsgi but it > > does connect under Rocket server and console. > > > ================================= > > NameVirtualHost *:80 > > <VirtualHost *:80> > > DocumentRoot "C:/web2py/applications" > > ServerName ochba-183 > > > <Directory "C:/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:/web2py/wsgihandler.py" > > > </VirtualHost> > > > NameVirtualHost *:443 > > <VirtualHost *:443> > > DocumentRoot "C:/web2py/applications" > > ServerName ochiba-183 > > > <Directory "C:/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:/web2py/wsgihandler.py" > > > SSLEngine On > > SSLCertificateFile conf/server.crt > > SSLCertificateKeyFile conf/server.key > > > </VirtualHost> > > ============================ > > On Oct 6, 6:47 pm, Paolo Caruccio <paolo.carucci...@gmail.com> wrote: > > > > The following istructions have been adapted > > > fromhttp://jdoe.asidev.com/2009/02/26/configure-web2py-to-run-behind-apac... > > > for my dev enviroment Windows + Apache + mod_wsgi. > > > I succesfully tested connection to db2 express from IMB through > > > pyodbc. Maybe it could help you. > > > I premise that I'm not a programmer and computer development is an > > > hobby for me, so my support will be very poor. > > > Below enviroment has been used for development only, not in > > > production. > > > > PREREQUISITES: python 2.7 installed on Windows > > > > STEP A - webserver preparation [http://sourceforge.net/projects/ > > > miniserver/files/Uniform%20Server/7.1.11-Orion/] > > > a1 - download and install uniformserver; > > > a2 - after installation, access to the server administrator panel and > > > "SECURE" all entries in the "Server Security" page; > > > a3 - generate a new SSL certificate by "Tools > Server Key & Cert Gen" > > > link on right sidebar; > > > a4 - create a certificate signed by our CA using UniServer_CA_1.0 > > > plugin [http://sourceforge.net/projects/miniserver/files/Plugins/ > > > UniServer_CA/]; > > > a5 - replace the files created in the a3 step in X:\UniServer\usr\local > > > \apache2\conf folder ( X is the drive where uniformserver has been > > > installed ); > > > a6 - install new certificate in Trusted Certification Authorities. > > > Usually I put ca.crt file in main folder of my website, start the > > > server, and by browser go tohttp://localhost/ca.crt > > > ( replace localhost with website name to simulate real situation > > > ) > > > and install the certificate following browser instructions; > > > a7 - start the server and check that https pages are accessible > > > without certificate errors. > > > Notes: when upgrade the server simply copy in their folders on the new > > > server the SSL files created in the previous version of the server > > > > STEP B - mod_wsgi [http://code.google.com/p/modwsgi/wiki/ > > > DownloadTheSoftware?tm=2] > > > b1 - download Windows binary selecting the correct one for the version > > > of Python and Apache that is being used ( I use mod_wsgi-win32- > > > ap22py27-3.3.so - Apache 2.2 / Python 2.7 ); > > > b2 - stop UniServer, rename downloaded file in "mod_wsgi.so" and put > > > it in X:\UniServer\usr\local\apache2\modules folder ( X is the drive > > > where uniformserver has been installed ); > > > b3 - add to X:\UniServer\usr\local\apache2\conf\httpd.conf file > > > following row: "LoadModule wsgi_module modules/mod_wsgi.so"( without > > > quotation marks ); > > > b4 - restart UniServer and check that mod_wsgi is succesfully > > > installed. > > > Notes: when upgrade the server repeat the step B > > > > STEP C - web2py (for sure you know where download it) > > > c1 - download web2py source code and unzip it in X:\UniServer\www > > > folder ( X is the drive where uniformserver has been installed ); > > > c2 - stop UniServer, start web2py server in standard way by double > > > clicking X:\UniServer\www\web2py\web2py.py in order that it create its > > > own files (don't change default settings); > > > c3 - stop web2py server and check that in web2py folder there are > > > "options_std.py" e "parameters_8000.py"; > > > c4 - open options_std.py and make sure of row "password = '<recycle>'" > > > is present; > > > c5 - create following symlinks (only in windows7 by "mklink" command > > > or using "Symlink Creator" [http://code.google.com/p/symlinker/ > > > downloads/list]): > > > 1) options_std.py -> options.py > > > 2) parameters_8000.py -> parameters_80.py > > > 3) parameters_8000.py -> parameters_443.py > > > Notes: in windowsXP copy files listed above on the left and rename > > > them with the names on the right. > > > When upgrade web2py, rename or delete previous web2py folder, > > > but > > > in the latter case make sure of backup your web2py apps. > > > > STEP D - apache vhost file > > > d1 - stop UniServer, create a new "vhost_web2py.conf" file in X: > > > \UniServer\usr\local\apache2\conf folder ( X is the drive where > > > uniformserver has been installed ) with following content : > > > > ##########VIRTUAL HOST SETUP########## > > > # WEB2PY.LOCALHOST > > > <VirtualHost ****LIP****:80> > > > ServerName ****SVN****:80 > > > DocumentRoot ****DIR****/www/web2py > > > WSGIScriptAlias / > > > ****DIR****/www/web2py/wsgihandler.py > > > ServerAdmin ****EMAIL**** > > > # static files do not need WSGI > > > <LocationMatch "^(/[\w_]*/static/.*)"> > > > Order Allow,Deny > > > Allow from all > > > </LocationMatch> > > > # everything else goes to web2py via wsgi > > > <Location "/"> > > > Order deny,allow > > > Allow from all > > > </Location> > > > # Log. Can be disabled > > > LogFormat "%h %l %u %t \"%r\" %>s %b" common > > > LogLevel notice > > > CustomLog ****DIR****/tmp/web2py.access.log common > > > ErrorLog ****DIR****/tmp/web2py.error.log > > > </VirtualHost> > > > > > > #------------------------------------------------------------ > > > <VirtualHost ****LIP****:443> > > > ServerName ****SVN****:443 > > > ServerAdmin ****EMAIL**** > > > DocumentRoot ****DIR****/www/web2py > > > WSGIScriptAlias / > > > ****DIR****/www/web2py/wsgihandler.py > > > # static files do not need WSGI > > > ... > > read more »