On Feb 9, 2011, at 8:49 AM, Ahmed Bani wrote:
> 
> Hello,
> 
> I am new to the web2py community, and I am so exited to start on my first 
> application.
> 
> I have two questions:
> 
> 1- Can I upload web2py to domain.com ? ( They have gave me some information 
> about their CGI and python support which I posted below my questions, here)
> 
> 2- What folders do I have to upload to the server to make it work (other than 
> admin, examples, welcome folders) ? 

Your cgi file will be cgihandler.py. Note that CGI deployment is going to be 
slow.

The core of web2py is in gluon; you'll need that, but you can leave out 
gluon/tests and probably gluon/contrib (upload individual files if you need 
them). There are some random files like VERSION that web2py expects to see.

Or go ahead and upload the whole mess; it's not that big, and the extra bits 
will do no harm.

I'd try this to begin with: get the web2py source download. Upload it to your 
cgi-bin directory, into its own subdirectory cgi-bin/web2py/. 

Your URL will be http://domainname/cgi-bin/web2py/cgihandler.py (you can worry 
about making it prettier later, especially if you have access to .htaccess). 
Accessing that URL should give you the front page of the welcome app.

I don't recall offhand what you need to do to get administrative access (the 
admin application), but I think you'll need SSL access.

> 
> Best regards,
> 
> Tazjel
> 
> 
> The following information is from domain.com 
> 
> 
> The Common Gateway Interface is a way of connecting your web pages to other 
> programs that are running on the server which visitors wouldn't normally have 
> access to. Most corporate web sites on the Internet today make use of CGI 
> programs or scripts to allow their visitors to browse online catalogues or 
> keep track of their orders in real time.
> 
> You have an ability to use CGI scripts on your website. The subdirectory 
> "webspace/cgi-bin" located in your home directory is intended for storing 
> your cgi files.
> 
> Before testing that CGI really works, devote a couple of minutes to read the 
> information you might find necessary.
> Paths and Versions:
> Perl Version        5.8.1.
> Path to Perl        /usr/bin/perl
> GID        48
> Supported Extensions        .pl, .cgi
> 
> Python Version        2.5.1
> Path to Python        /usr/local/bin/python
> Supported Extension        .py     Supported Modules        Base Modules, 
> MySQLdb
> 
> Path to Sendmail        /usr/sbin/sendmail
> Operating System        RedHat Linux
> 
> CGI Directory        /cgi-bin/
> 
> The URL to your CGIs is as follows: http://domainname/cgi-bin/cgi-script
> Replace the “domainname” with the real name of your domain and “cgi-script” 
> with the script name.
> 
> Here are some tips for you to bear in mind when using CGI:
> • Perl-scripts being transferred via FTP should be in “ASCII” code, not in 
> “binary”.
> • All scripts are executed only in cgi-bin directory.
> • After uploading cgi-script change its permission to 755. Use the PEM File 
> Manager to do this quickly. 


Reply via email to