LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to Setup Basic Webserver? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-setup-basic-webserver-173300/)

simsjr 04-22-2004 08:56 AM

How to Setup Basic Webserver?
 
Hola,

Ok, so I would really love to start learning the ins and outs of Linux webserving. For starters, I'm running Slackware 9.1 (2.4 kernel) and want to enable HTTP traffic to a single directory on my primary HD. This is going to be an experiment mostly, but I still want to keep my box as secure as possible while I do this.

Basic capabilities should include PHP & MySQL functionality. If anyone knows of any other addtional services I should experiment with while putting myself through "webmin" school, please enlighten me.

Is there a standard methodology for setting up a Linux webserver? I'd like to stick to the "book" in a manner of speaking, if there is in fact a "book" to begin with. Make sense?

That said, where do I start? :)

Gates1026 04-22-2004 10:59 AM

I would say if you want everything secure then you need to start with a firewall. You will want to drop all incoming connections that are not destined for port 80 (http) or if you want port 443 (https). After your firewall is all setup, you should run nmap on your machine and see what ports are open to the outside world.

After that comes the apache setup. Not sure if you have done any of this before so sorry if I make it too simple :) You should su to root and then cd /etc/rc.d. in this directory you will see a bunch of files that start with rc.<service>. You will find one that is rc.httpd. To make it executable you will want to chmod +x rc.httpd. Then you should ./rc.http start. If this gives you any errors, please post them and I can help you out. I know that after updating with swaret, I needed to make some changes to my /etc/apache/httpd.conf file. You will also want to uncomment the lines at the bottom of the httpd.conf file that read:
Include /etc/apache/mod_ssl.conf
and
Include /etc/apache/mod_php.conf

These will include the modules so you can run ssl support and php. Let me know if you have any problems or if I didnt answer the correct question :)

simsjr 04-22-2004 04:21 PM

Awesome. I forgot about SSL and HTTPS! Deffinately essential.

Thanks! :)


All times are GMT -5. The time now is 09:56 PM.