[plug] APACHE - the Mandrake answer

Leon Brooks leon at brooks.fdns.net
Tue Jul 20 11:36:46 WST 2004


On Thu, 15 Jul 2004 15:40, Aaron Thorn wrote:
> I´ve worked with asp and want to see if it is easy to migrate
> over to CGI.

Try this as root:

urpmi apache2-mod_php php-pgsql php-cli php-gd php-ming php-imap

That will give you a nice collection of PHP tools. The on-line annotated 
manual lives here:

    http://www.php.net/manual/en/

They have a section somewhere on the site for users converting from ASP. 
You might also find this helpful, but I think you'll need to have your 
package manager configured to see the contribs as well as the main 
packages:

    urpmi asp2php

If that comes up empty, try something like this, then go back and try 
for asp2php again:

    urpmi.addmedium contrib ftp://mirror.pacific.net.au/mandrake/RPMS2 \
      with ../base/hdlist2.cz

There's also a GUI for that called gtkasp2php.

If you haven't yet configured for updates, do it now:

    urpmi.addmedium --update pacupd \
      ftp://mirror.pacific.net.au/mandrake/updates/10.0/RPMS \
      with ../base/hdlist.cz

...then...

    urpmi --auto-select

This will take a *long* time the first time through on a dialup. Visit a 
friend with DSL and a few hundred MB of spare quota.

Ever after:

    urpmi.update pacupd
    urpmi --auto-select

Unless you are doing something fancy, you can use Apache as-is out of 
the box. I generally do this in/etc/httpd/2.0/conf/httpd2.conf:

#Include conf/vhosts/Vhosts.conf
Include conf/vhosts/DynamicVhosts.conf

...and then uncover in /etc/httpd/2.0/conf/vhosts/DynamicVhosts.conf:

UseCanonicalName Off
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
CustomLog logs/access_log vcommon
VirtualDocumentRoot /var/www/virtual/%-3.0.%-2.0.%-1/%-4
<Directory /var/www/virtual>
    Allow from all
    AllowOverride AuthConfig Indexes Limit Options
    Options FollowSymLinks Indexes
    IndexOptions NameWidth=* FoldersFirst IgnoreCase VersionSort 
FancyIndexing
    ReadMeName README
</Directory>

(FancyIndexing should be on the end of the IndexOptions line) then 
restart the service:

    service httpd restart

Now just add DNS entries and make directories like this for your 
content, no further config tweaking needed:

    mkdir /var/www/virtual/mydomain.com.au/www
    cd /var/www/virtual/mydomain.com.au
    ln -s www _
    chown -R nameofuser www
    cd ~nameofuser
    ln -s /var/www/virtual/mydomain.com.au/www web

The effect of this is that anyone logged in as nameofuser (including 
through Samba) can drop files into web/ and they'll appear at 
http://www.mydomain.com.au/ and also http://mydomain.com.au/

OK, that compile's finished now (kdegraphics). Have a good day. (-:

Cheers; Leon



More information about the plug mailing list