LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Apache + SSL as a module (https://www.linuxquestions.org/questions/linux-security-4/apache-ssl-as-a-module-232714/)

kernelvn 09-19-2004 08:58 PM

Apache + SSL as a module
 
hey everybody , I'm going to apply SSL to my Apache , when I read the document , I found that there's 2 way to use SSL with Apache , the fist is installing Apache-SSL , that's easy and simple way but we have to type https:// insteal of http:// . The second way is that installing SSL as a module of Apache , and I think that was a betterway . But there something I can find out howto in the document . So I would like go get some help from you .

I download apache and mod_ssl to my /tmp , unzip it all . Now going to the mod_ssl forder , I configure it as :

Quote:

cd mod_ssl-2.8.12-1.3.27/
./configure --with-apache=../apache_1.3.1
Now going to apache forder and tried :


Quote:

# ./configure \
> --prefix=/usr/local/apache \
> --disable-module=all \
> --server-uid=apache \
> --server-gid=apache \
> --enable-module=access \
> --enable-module=log_config \
> --enalbe-module=dir \
> --enable-module=mime \
> --enable-module=auth \
> --enable-module=so \
>--enable-shared=ssl \
>--enable-module=ssl \
> --enable-module=rewrite

make

make install
And now I going to configure apache by vi httpd.conf . When looking at that , I was happy because there are some thing for me in it . Here we are :


Quote:

<IfDefine SSL>
LoadModule ssl_module libexec/libssl.so
</IfDefine>

<IfDefine SSL>
AddModule mod_ssl.c
</IfDefine>
So I think SSL was install as a module of Apache . But I want that :
When I try : http://localhost/ , it going to my home page .
When I try : https://localhost/phpPgAdmin/ , it going to my phpPgAdmin ( I've installed it successfuly with http ) .

My document root is :
DocumentRoot "/usr/local/apache/"

and phpPgAdmin I put in :
<Directory "/usr/local/apache/phpPgAdmin">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

I don't know how to change those option in the <Directory </Directory> to be able to run https://localhost/phpPgAdmin .

I do not want to use virtual host too because I do not have any dns to test .
As gmail , I see that the login form work with ssl , but when login success , I turn back to http only . How should I do ?

dominant 09-20-2004 02:20 AM

Have you configured your virtual hosts?

<VirtualHost ServerIP:80>
Here put Document root for http
</VirtualHost>

<VirtualHost ServerIP:443>
Here put Document root for https
</VirtualHost>

kernelvn 09-20-2004 02:52 AM

But my friend tell me that if I want to use virtual host , I have to had a DNS server ( can not try http://10.0.0.4/phpPgAdmin ) . It's right ?

dominant 09-20-2004 03:16 AM

Here is a good reference
http://httpd.apache.org/docs-2.0/vhosts/examples.html


All times are GMT -5. The time now is 08:48 PM.