LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-25-2003, 09:11 PM   #1
Tiger-Striped
LQ Newbie
 
Registered: Aug 2003
Location: Canada..EH!
Distribution: Slackware 12.0
Posts: 20

Rep: Reputation: 0
L.A.M.P on SlackWare (webserver)


Can anyone who knows much about configuring a web-server private if possible using Slackware, Apache, MySQL, and PHP, I want this to run as a private server on my network. I"m just new to Slackware and I enjoy it, but I'm still a beginner and got the webserver running but I don't know how to configure it properly. I have tried many tutorials but they are all confusing since they are relational to RH, SUSE, Mandrake, but I haven't seen one for Slackware. So if any Slackers can help a new slacker out it is greatly appreciated. Thank you in advance.
 
Old 11-25-2003, 11:58 PM   #2
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
I'll take the challenge just for the heck of it.

First and foremost, you need to have the necessary packages installed. I assume that this shouldn't be a problem. You can get the latest packages for Apache, PHP and MySQL from your nearest Slackware-current mirror.

The first file that you should take a look at is /etc/apache/httpd.conf. This is where you configure your Apache HTTP server. The default setting would be OK for an intranet web site, you only need to worry about getting PHP functionality for Apache.

If you have this file: /etc/apache/mod_php.conf, you have an easy job ahead as you only need to look for this line in your httpd.conf, and uncomment it (ie. remove the leading #):
Code:
#Include /etc/apache/mod_php.conf
If not, you have to do the following:

You can do this by loading the PHP4 module... Run a search for LoadModule in your httpd.conf file. You should see a group of entries similar to these:
Code:
LoadModule vhost_alias_module libexec/mod_vhost_alias.so
LoadModule env_module         libexec/mod_env.so
LoadModule define_module      libexec/mod_define.so
At the end of these entries, stick in your PHP4 LoadModule entry which should look like this:
Code:
LoadModule php4_module        libexec/libphp4.so
After that, scroll downwards a little bit and you should see the AddModule section... here, you should add the AddModule entry for PHP4, which should look like this:
Code:
AddModule mod_php4.c
Now you should add directory index support for PHP files, ie. make the server recognise index.php along with the common index.html file. To do this look for the <IfModule mod_dir.c> section and modify it to look as follows:
Code:
<IfModule mod_dir.c>
    DirectoryIndex index.html index.php
</IfModule>
After that, look for the AddType section and add this entry to it:
Code:
AddType application/x-httpd-php .php
Walla... done with httpd.conf

Now the next step... the /etc/apache/php.ini file. By default, it should already be loaded. Just check to see if you can find this line:
Code:
extension=mysql.so
Yes? Good

Now you should check the default MySQL privileges and set the root password.

You're now almost there, all you need to do now is to make sure your necessary rc files are executable... Just go to your /etc/rc.d dir, and chmod +x rc.httpd rc.mysql.

The next time you reboot your machine, Apache and MySQL will run at startup

Oh... and in case you're wondering where your web pages are... They're at /var/www/htdocs... this is defined in your httpd.conf file and you can change it to something else. But make sure that the directory is accessable and writable by the user who's going to manage your web site.
 
Old 11-29-2003, 04:10 AM   #3
Tiger-Striped
LQ Newbie
 
Registered: Aug 2003
Location: Canada..EH!
Distribution: Slackware 12.0
Posts: 20

Original Poster
Rep: Reputation: 0
Thank you alot I appreciate the fast reply on my head banging question. Sorry for my slow response. I have a few more questions though, how do I set-up cgi, perl and setting up my server name to be www.myserver's-name.com instead of localhost. Is this all controlled through BIND?
 
Old 11-29-2003, 08:48 PM   #4
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
You can install perl from the slackware/d/ dir of your first CD.

CGI should already be enabled by default in apache. However, I'm not 100% sure on this.

Perhaps you can create a dir called cgi-bin in your webroot and create a test perl script to see if it runs.
 
Old 11-30-2003, 07:36 AM   #5
Misel
Member
 
Registered: Mar 2003
Location: Berlin
Distribution: Slackware current
Posts: 310

Rep: Reputation: 31
Slackware comes with Apache (1.3 though), PHP, Perl, mySQL. So why bother with L.A.M.P.?
 
Old 11-30-2003, 07:56 AM   #6
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
Quote:
Originally posted by Misel
Slackware comes with Apache (1.3 though), PHP, Perl, mySQL. So why bother with L.A.M.P.?
FYI, L.A.M.P. is an acronym for Linux Apache MySQL PHP.

Tiger-Striped just want help on getting the whole thing to run.
 
Old 11-30-2003, 08:55 AM   #7
Misel
Member
 
Registered: Mar 2003
Location: Berlin
Distribution: Slackware current
Posts: 310

Rep: Reputation: 31
Quote:
Originally posted by Azmeen
FYI, L.A.M.P. is an acronym for Linux Apache MySQL PHP.

Tiger-Striped just want help on getting the whole thing to run.
Oh, I thought he was talking about this project which was formerly called LAMPP. My bad.
 
Old 11-30-2003, 12:55 PM   #8
Tiger-Striped
LQ Newbie
 
Registered: Aug 2003
Location: Canada..EH!
Distribution: Slackware 12.0
Posts: 20

Original Poster
Rep: Reputation: 0
Sorry guys, I'm new to all this stuff, and I just wanted to learn how to configure a webserver and get it running and see how it works. Xampp is what I was looking for, thanks alot for your time guys (almost the same as Webmin). I appreciate it. It works good. Now it's my turn to get into the world of Linux.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware as Webserver MrLiquidated Slackware 7 08-16-2005 03:04 PM
problem with apache/slackware webserver mole_13 Linux - Networking 3 05-23-2005 01:49 AM
Minimum Slackware 10.0 install for webserver user_of_slack Slackware 11 10-03-2004 09:13 AM
Can't access webserver IN network (slackware/apache) hcubed Linux - Networking 5 04-14-2004 04:20 PM
Apache Webserver Help on Slackware 9.1 Corallis Linux - Newbie 1 01-28-2004 04:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration