User Tools

Site Tools


eg-259:practicals:3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eg-259:practicals:3 [2012/03/14 07:56] – [What Does Deployment Do?] eechriseg-259:practicals:3 [2012/03/14 10:34] (current) – [Trouble Shooting] eechris
Line 45: Line 45:
 ===== Configure deploy.sh for Linux/Unix ===== ===== Configure deploy.sh for Linux/Unix =====
  
-On Linux/Unix (probably including Mac OS X), edit the bash-shell script ''deploy.sh'' and change the line:+On Linux/Unix (probably including Mac OS X), edit the bash-shell script ''deploy.sh'' and change the lines:
  
-  SERVER_ROOT=/cygdrive/e/xampp/lampp+  SERVER_ROOT=/etc/apache2 
 +  DOCUMENT_ROOT=/var/www 
 +  CGI_BIN=/usr/lib/cgi-bin
  
-to reflect your local situation (if you installed the Ubuntu distribution of Apache directory you would replace ''/cygdrive/e/xampp/lampp'' with ''/var/www''). Now run deploy.sh as root:+to reflect your local situation(Some examples for the servers I know are in the file commented out.)  
 + 
 +Now run deploy.sh as root:
 <cli> <cli>
 $ sudo ./deploy.sh $ sudo ./deploy.sh
Line 71: Line 75:
 ===== Trouble Shooting ===== ===== Trouble Shooting =====
  
-If any of the demos fails, the most likely reason will be file permissions. Check that the resource ''$SERVER_ROOT/cgi-bin/echo_params.cgi'' is executable by the web server and also that the "hash-bang" line is correctly set to the full path of your installed Perl interpreter. The example PHP scripts with ''beer.php'' and ''echo_params.php'' need only to be readable by the web server.+If any of the demos fails, the most likely reason will be file permissions. Check that the resource ''$CGI_BIN/echo_params.cgi'' is executable by the web server and also that the "hash-bang" line is correctly set to the full path of your installed Perl interpreter. The example PHP scripts with ''beer.php'' and ''echo_params.php'' need only to be readable by the web server. 
 + 
 +Another possible problem, especially on Unix-based operating systems (Linux/Mac) may be due to line endings. Ubuntu provides a package that provides tools to correct this: 
 +<cli> 
 +$ sudo apt-get install tofrodos 
 +$ cd /usr/bin 
 +$ sudo ln -s fromdos dos2unix 
 +$ sudo ln -s todos unix2dos 
 +</cli> 
 + 
 +Then change the line endings of the cgi-script: 
 +<cli> 
 +$ cd $CGI_BIN/cgi-bin 
 +$ sudo dos2unix echo_params.cgi 
 +</cli>
  
-If these tips don't help, it would be worth noting the error message returned by the web server and looking into the server error log ''$SERVER_ROOT/apache/logs/error_log'' for a hint about what might be wrong.+If these tips don't help, it would be worth noting the error message returned by the web server and looking into the server error log ''sudo tail /var/log/apache2/error.log'' for a hint about what might be wrong.
  
 ===== References ===== ===== References =====
eg-259/practicals/3.txt · Last modified: 2012/03/14 10:34 by eechris