apache,php and ssl configuration on slackware
login as root
pkgtool
select setup
click services
select rc.httpd
put a star beside it
exit
mcedit /etc/httpd/httpd.conf
find the line
DirectoryIndex index.html
copy the line and paste it just below the line
DirectoryIndex index.html
change html to php
find mod_php
you will find the line
Include /etc/httpd/mod_php.conf
uncomment this line
save and exit
mcedit /etc/httpd/php.ini
find the line
short_open_tag=Off
change it to On
find another line
asp_tags=Off
change it to On
save and exit
cd /var/www/htdocs
mc
the mc interface will open
copy the index.html file
rename the copied file as index.php
open the index.php file in mc
write
less than?php
phpinfo();
?greater than
save and exit
/etc/rc.d/rc.httpd stop
/etc/rc.d/rc.httpd start
go to http://192.168.28.51/index.php
you should see the php information
to get the information about httpd
slackpkg info httpd
cd /etc/rc.d
ls
you will find rc.httpd
if rc.httpd is not executable
make it executable
chmod +x rc.httpd
mcedit /etc/httpd/httpd.conf
find the line
Listen 80
change it to
192.168.28.51:80
find the line
starting with
Loadmodule ssl
uncomment this line
find the file
Include /etc/httpd/extra/httpd-ssl.conf
uncomment this line
save and exit
open
/etc/httpd/extra/httpd-ssl.conf
find the line
Listen 443
change it to
192.168.28.51:443
(if you keep the Listen 443 line ,you will get an error starting apache,so remove Listen 443)
find
SSLCertificateFile "/etc/httpd/server.crt"
uncomment the line if it is commented
find
SSLCertificateKeyFile "/etc/httpd/server.key"
uncomment the line if it is commented
save and exit
Now
locate *.crt
you will find a crt file in the /usr/doc/openvpn 2.x/sample-keys folder
go to that folder
copy server.crt and server.key file to /etc/httpd/
/etc/rc.d/rc.httpd restart
netstat -ntlp | grep httpd
it will show httpd listening on 80 and 443 port
open
https://192.168.28.51
login as root
pkgtool
select setup
click services
select rc.httpd
put a star beside it
exit
mcedit /etc/httpd/httpd.conf
find the line
DirectoryIndex index.html
copy the line and paste it just below the line
DirectoryIndex index.html
change html to php
find mod_php
you will find the line
Include /etc/httpd/mod_php.conf
uncomment this line
save and exit
mcedit /etc/httpd/php.ini
find the line
short_open_tag=Off
change it to On
find another line
asp_tags=Off
change it to On
save and exit
cd /var/www/htdocs
mc
the mc interface will open
copy the index.html file
rename the copied file as index.php
open the index.php file in mc
write
less than?php
phpinfo();
?greater than
save and exit
/etc/rc.d/rc.httpd stop
/etc/rc.d/rc.httpd start
go to http://192.168.28.51/index.php
you should see the php information
to get the information about httpd
slackpkg info httpd
cd /etc/rc.d
ls
you will find rc.httpd
if rc.httpd is not executable
make it executable
chmod +x rc.httpd
mcedit /etc/httpd/httpd.conf
find the line
Listen 80
change it to
192.168.28.51:80
find the line
starting with
Loadmodule ssl
uncomment this line
find the file
Include /etc/httpd/extra/httpd-ssl.conf
uncomment this line
save and exit
open
/etc/httpd/extra/httpd-ssl.conf
find the line
Listen 443
change it to
192.168.28.51:443
(if you keep the Listen 443 line ,you will get an error starting apache,so remove Listen 443)
find
SSLCertificateFile "/etc/httpd/server.crt"
uncomment the line if it is commented
find
SSLCertificateKeyFile "/etc/httpd/server.key"
uncomment the line if it is commented
save and exit
Now
locate *.crt
you will find a crt file in the /usr/doc/openvpn 2.x/sample-keys folder
go to that folder
copy server.crt and server.key file to /etc/httpd/
/etc/rc.d/rc.httpd restart
netstat -ntlp | grep httpd
it will show httpd listening on 80 and 443 port
open
https://192.168.28.51
No comments:
Post a Comment