disturbedone
Vendor
Hi, firstly I'm a relative newbie to Apache and Linux. My issue has been written about by a couple of others on here but I couldn't see a definitive answer.
Here goes...
Very basic install of Ubunutu 9.04 Desktop, Apache2.2, PHP5, MySQL5.1, PHPMyAdmin. I've literally installed that and left it as is. Yes, there is a lot to do to get this secure and configured correctly if I was to place this server publicy but at this stage I just need to get it to work in the lab and then I'll work on the rest of it.
Browsing to gives the Apache "It works!" page. Browsing to works. All ok there.
I've got a very simple MySQL db with one table for a list of names, phone numbers, address etc. I've got a Perl script that opens the db and extracts all the fields and should display it on an HTML page. Running the script from the command line shows what it should - it shows the values of the fields from the db.
The issue is the placement and permissions for the .pl/.cgi file. From my reading the /usr/lib/cgi-bin/ folder should be where I place the file. The /etc/apache2/sites-available/default file has the following which makes me thinlk this...
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AddHandler cgi-scripts .cgi .pl
Order allow,deny
Allow from all
</Directory>
Regardless of where I place the .pl (or .cgi) file my browser (Firefox 3) on both the local machine and a network machine both ask me if I want to open/save the file rather than the server running the script. I'm accessing this via I'm sure I could place this in another folder if I'd setup multiple virtual hosts but I'm not worried about that just yet.
I've tried adding the 'Options +ExecCGI' & 'AddHandler cgi-scripts' to the default root directory in the /sites-enabled/default file but no change. And restarted Apache too.
Can someone please point me in the right direction to get this to work? Cheers.
Here goes...
Very basic install of Ubunutu 9.04 Desktop, Apache2.2, PHP5, MySQL5.1, PHPMyAdmin. I've literally installed that and left it as is. Yes, there is a lot to do to get this secure and configured correctly if I was to place this server publicy but at this stage I just need to get it to work in the lab and then I'll work on the rest of it.
Browsing to gives the Apache "It works!" page. Browsing to works. All ok there.
I've got a very simple MySQL db with one table for a list of names, phone numbers, address etc. I've got a Perl script that opens the db and extracts all the fields and should display it on an HTML page. Running the script from the command line shows what it should - it shows the values of the fields from the db.
The issue is the placement and permissions for the .pl/.cgi file. From my reading the /usr/lib/cgi-bin/ folder should be where I place the file. The /etc/apache2/sites-available/default file has the following which makes me thinlk this...
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AddHandler cgi-scripts .cgi .pl
Order allow,deny
Allow from all
</Directory>
Regardless of where I place the .pl (or .cgi) file my browser (Firefox 3) on both the local machine and a network machine both ask me if I want to open/save the file rather than the server running the script. I'm accessing this via I'm sure I could place this in another folder if I'd setup multiple virtual hosts but I'm not worried about that just yet.
I've tried adding the 'Options +ExecCGI' & 'AddHandler cgi-scripts' to the default root directory in the /sites-enabled/default file but no change. And restarted Apache too.
Can someone please point me in the right direction to get this to work? Cheers.