LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Basic Apache Configuration (https://www.linuxquestions.org/questions/linux-software-2/basic-apache-configuration-463529/)

Simdude90015 07-12-2006 11:47 PM

Basic Apache Configuration
 
I just installed Apache 2.2.2, and I would like to know how to configure it to run at boot, run on port 85 (or some other non-standard port), execute PHP (which I havn't installed yet... do I need to do anything special to make it work with apache?), serve files from /www/, and support https (over a non-standard port).

This is my first time working with apache and I feel sorta overwhelmed. I tried the docs on apache.org, but they don't give many examples.

Thanks for any help!

-Jim
(Linux :newbie:)

infestator 07-13-2006 01:45 AM

all examples placed in apache.conf (httpd.conf) file:
- to listen ti 85 port and all ips: Listen 0.0.0.0:85
- to make /www/ your document root: DocumentRoot /www/

i haven't use https, so i don't know how to configure it.

for php:
Code:

<IfDefine PHP5>

        # Load the module first
        <IfModule !mod_php5.c>
                LoadModule php5_module    modules/libphp5.so
        </IfModule>

        # Set it to handle the files
        <IfModule mod_mime.c>
                AddType application/x-httpd-php .php
                AddType application/x-httpd-php .phtml
                AddType application/x-httpd-php .php3
                AddType application/x-httpd-php .php4
                AddType application/x-httpd-php .php5
                AddType application/x-httpd-php-source .phps
        </IfModule>

        AddDirectoryIndex index.php index.phtml
</IfDefine>

this is gentoo's default config file for php. you can place it into apache.conf, or in any other file and include it from apache.conf. but you'll need to run httpd with '-D PHP5' parameter to make this code work (or just remove directives '<IfDefine PHP5>...</IfDefine>').

autostart:
i hadn't ever used debian, so i don't know how it's runscripts done. the easiest way to autostart if to place 'apache start -D PHP5' command in one of that scripts, which runs after network interface configuration script.

Simdude90015 07-13-2006 01:13 PM

It didnt work, so I tinkered with it to try to make it work. I failed miserably. I'll wipe the drive and re-install the OS. Could someone point me to an idiots guide to Installing and configuring Apache & PHP?

NomadX 07-13-2006 03:09 PM

http://www.justlinux.com/nhf/Webserv...che_Intro.html

or

http://www.apachefreaks.com/apache_tutorials.php

for something more particular....

Why reinstall if its only a busted apache config? This isnt windows.... btw... https is SSL (secure socket layer) and it's fairly straight forward to use... just instal mod_ssl and OpenSSL and find a quicky howto... google is your friend...

usernamenone 07-14-2006 01:41 AM

Ubuntu Server
 
You may want to install Linux Ubuntu server, it has apache with all the sql and php etc in the install.

Simdude90015 07-14-2006 01:12 PM

Well, This is part of a larger project... a basic home theatre system. It's just for Xvid Files, etc. I tried the Server install of Ubuntu and couldn't get mplayer to work right.

NomadX 07-14-2006 05:14 PM

With mplayer or xine in ubuntu you need to go to their respective websites and get the win32 codecs... Ubuntu is very picky about US license issues... with good reason...

ghettopunkkid 07-14-2006 08:21 PM

Quote:

Originally Posted by usernamenone
You may want to install Linux Ubuntu server, it has apache with all the sql and php etc in the install.

:D :D :D :D

Simdude90015 07-14-2006 10:16 PM

Quote:

Originally Posted by DrStoney
With mplayer or xine in ubuntu you need to go to their respective websites and get the win32 codecs... Ubuntu is very picky about US license issues... with good reason...


Actually, I just compiled it myself. The problems I was having was with getting the video from mplayer to my display... none of the -vo options would work.


All times are GMT -5. The time now is 07:59 PM.