Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i have just installed apache2 in Debian Squeeze, i am working on making ssl certification work in apache. so far i have gotten some commands going in httpd.conf file which is empty by default i am guessing that the contents of the httpd.conf take prescedence over the apache.conf file. i am wrong correct me
after reading all of the literature and resources i have gotten pretty far with this the command prompt never tells me that theres an error anymore i get the okay when the server starts, i created all of the files from openssl like this
when i restart the server everything starts up fine, but when i open up a browser and type in localhost, the it works screen comes up but i don't get a prompt for an ssl certificate it just loads as if the ssl configurations weren't put in there in the first place
no everything starts up and loads up fine like i didn't put the ssl module tag in the httpd.conf file, is there something wrong with the way i entered it in the file inside the 2nd code box. because i think it has something to do with my coding and not the server itself
or am i putting it in the wrong file, is it suppossed to go inside of /etc/apache2/apache.conf instead of /etc/apache2/httpd.conf
Last edited by baronobeefdip; 01-23-2012 at 01:50 PM.
I can see that the fellow developers at Debian have found a way to simplify the certification creation and the installation of the modules processes for us but as for getting the server to communicate with ssl requests is a something that has to be done by hand but all i want to know is since it is saying to put all of these commands at the end inside of a virtualhost declaration then where do i put it in if i want it to effect the main host instead of a virtual one would it be like this
all i want to know is since it is saying to put all of these commands at the end inside of a virtualhost declaration then where do i put it in if i want it to effect the main host instead of a virtual one would it be like this
The main host (aka default vhost) in debian is defined in /etc/apache2/sites-available/default. So should put your ssl stuff in there.
BTW debian uses /etc/apache2/apache2.conf as the main config file. /etc/apache2/httpd.conf is kept for compatibility and its included in apache2.conf, so you can add your stuff there, if you want.
The main host (aka default vhost) in debian is defined in /etc/apache2/sites-available/default. So should put your ssl stuff in there.
BTW debian uses /etc/apache2/apache2.conf as the main config file. /etc/apache2/httpd.conf is kept for compatibility and its included in apache2.conf, so you can add your stuff there, if you want.
Regards
so i guess the VirtualHost declaration to have it listen for port 443 (ssl connections) should go in to /etc/apache2/sites-available/default file or can it go in httpd.conf too, unless you tell me otherwise i'll assume that it should go in /etc/apache2/sites-available/default
and do i need to provide some redirection options to make it go from http to https when i try to access the web site or will it do it automatically if i try to access it with what we covered so far?
Last edited by baronobeefdip; 01-24-2012 at 08:23 AM.
so i guess the VirtualHost declaration to have it listen for port 443 (ssl connections) should go in to /etc/apache2/sites-available/default file or can it go in httpd.conf too, unless you tell me otherwise i'll assume that it should go in /etc/apache2/sites-available/default
If you want to be consistent with the debian apache layout, you should define your default vhost in /etc/apache2/sites-available/default
Quote:
and do i need to provide some redirection options to make it go from http to https when i try to access the web site or will it do it automatically if i try to access it with what we covered so far?
You can use mod_rewrite inside the vhost container to rewrite http to https, if that's what you want.
i just went through the steps and i can't run the command
Code:
apache2-ssl-certificate
so i don't have a certificate that has been generated all i am getting is a bash: command not found prompt what could i be doing wrong now
i am also not getting the certificate prompt yet again, so is there an issue with the firewall also is there a way to automatically generate a rewrite tag that will re-direct the default web website to the default-ssl website
Last edited by baronobeefdip; 01-24-2012 at 09:48 AM.
right i got that part of the rewrite module but where does it go, in the /etc/apache2/sites-available/default file or somewhere else
Yes, it goes into that file, assuming that you don't have other vhosts.
Mind that you need to put the rewrite stuff into the vhost that runs on port 80 (not the secure on port 443, obviously)
and i also see that you specified stuff like "HTTP_HOST" and "REQUEST_URI" are these suppossed to be filled in with something different or leave them as is
and did you make a typo in "REQUEST_URI" i think that I is suppossed to be an L
and i also see that you specified stuff like "HTTP_HOST" and "REQUEST_URI" are these suppossed to be filled in with something different or leave them as is
and did you make a typo in "REQUEST_URI" i think that I is suppossed to be an L
No, these are http variables, that are used by apache to specify the vhost and the resource requested. (it's URI not URL)
I suggest you to have a look at mod_rewrite documentation.
so on my localhost config document i would have to put those entries in it (since the /etc/apache2/sites-available/default is the config file for the local host) you want me to put those rewrite entries somewhere in it. and this can be used to redirect the default 80 port service to port 443 and make it go to the https location. the example you have given was a little vague so i want to know how to do it in my case as an example (and i can go on referencing from the example hopefully by then i would have mastered this module) here are my specs
ip address - 192.168.1.101
netmask - 255.255.255.0
gateway - 192.168.1.1
operating system - Debian Squeeze
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.