Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


New to SSL, need some help
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

New to SSL, need some help

IvanIvan Member
edited April 2013 in Help

Hey guys, sorry if I'm posting at the wrong place. Sorry if I'm not even supposed to post this here at LET, but I just got a domain today and just enabled SSL/https. I got my SSL cert from StartSSL for free.
I installed everything, it worked, but the only thing is I'm given this error whenever I access my site with
https://:

Not Found

The requested URL / was not found on this server.
Apache/2.2.22 (Ubuntu) Server at mydomain.com Port 443

And the SSL works perfectly though, I can see the green https and all

And since it's using port 443, I assume that's the reason. I installed the SSL using a2enmod ssl instead of a2ensite ssl since whenever I use that it says "Site ssl does not exist!", and the StartSSL installation help said I should use mod_ssl instead.

Can anyone help? I have no idea what to do, I want the SSL to work on port 80, or is there a workaround here that I'm missing? Sorry, I'm still new to this. I'd appreciate it a lot if anyone could help.

Comments

  • netomxnetomx Moderator, Veteran

    Did you installed the SSL certificates?

  • IvanIvan Member

    @netomx said: Did you installed the SSL certificates?

    the SSL works perfectly though, I can see the green https and all

  • gbshousegbshouse Member, Host Rep

    Check here

  • if not mistaken there are lot of guides online u can refer to
    i too refer online

    u need to create the file first before u can a2ensite

  • why u wan ssl to work on port 80?

  • IvanIvan Member
    edited April 2013

    But how am I suppose to get port 443 to work on my html/site directory? Sorry, I don't know how to phrase things since I'm new to this.

    Alright so I added "Listen 443" to ports.conf and now when I try to restart apache it gives me this error
    (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
    no listening sockets available, shutting down
    Unable to open logs
    Action 'start' failed.

    and yes, I'm also searching Google while replying here

  • jhjh Member
    lsof -i :443
  • IvanIvan Member

    @jhadley said: lsof -i :443

    This command did not work, but after I removed the "Listen 443" below "Listen 80" in ports.conf, the command gave me this:

    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    apache2 7669 root 4u IPv4 58264573 0t0 TCP *:https (LISTEN)
    apache2 7674 www-data 4u IPv4 58264573 0t0 TCP *:https (LISTEN)

    But I'm still getting

    Not Found
    The requested URL / was not found on this server.

    whenever I'm accessing my site in https. How do I get it to work and show the contents of /var/www?

  • jhjh Member

    As far as Apache is concerned, :80 and :443 are two different addresses that each need to be linked to the correct directory with a VirtualHost.

    You can Google to find suitable VirtualHost templates, or hire a sysadmin for a couple of minutes to do it for you.

  • @teohkay said: Address already in use

    netstat -tulpn

  • IvanIvan Member
    edited April 2013

    @jhadley said: As far as Apache is concerned, :80 and :443 are two different addresses that each need to be linked to the correct directory with a VirtualHost.

    You can Google to find suitable VirtualHost templates, or hire a sysadmin for a couple of minutes to do it for you.

    I'll try Googling then

  • IvanIvan Member
    edited April 2013

    @johnlth93 said: @teohkay said: Address already in use

    netstat -tulpn

    652/sendmail: MTA:
    tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN

    Is this the problem?

    Edit: So after I killed the process that was using port 443, theres still no change. Will continue Googling then. Probably something up with my VirtualHost config

  • Look into the virtualhost configuration file.
    Create a new directory listener or whatever that is called on port 443.

    Also, don't reveal your age here, you're gonna get bashed by tons of riots, because LET.

  • IvanIvan Member
    edited April 2013

    @GIANT_CRAB said: Create a new directory listener or whatever that is called on port 443.

    I'll have a look into the VirtualHost config

  • GIANT_CRABGIANT_CRAB Member
    edited April 2013
    < VirtualHost some_bloody_IP_address:443>
    DocumentRoot /www/some/stupid/directory/to/place/web/files
    ServerName www.some_random_website.com
    
    # Other directives here
    
    < /VirtualHost>
    

    Remove the space between the VirtualHost code and the blank space

    read this: httpd.apache.org/docs/2.4/vhosts/examples.html

  • Also, there's something called OpenSSL, did you installed that or something?

    mod_ssl openssl

  • IvanIvan Member
    edited April 2013

    @GIANT_CRAB said: Also, there's something called OpenSSL, did you installed that or something?

    mod_ssl openssl

    Yes. My ssl folders were in /etc/ssl but I just created a folder in /etc/apache2/ called ssl and it worked. I think my Vhost is just not properly configured.

  • can u start the apache again and show us what's the current error?

  • IvanIvan Member
    edited April 2013

    [Fri Apr 05 12:23:50 2013] [error] Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] ((null):0)

    I can't even start apache now. It worked before, must've done something wrong in the Virtualhost config. can someone tell me, which one should I edit, the one in sites-enabled called 000-default or default in sites-available?

  • johnlth93johnlth93 Member
    edited April 2013

    @teohkay said: Server should be SSL-aware but has no certificate configured

    did you configure the SSL cert/key/and such?
    within the vhost block

    @teohkay said: which one should I edit, the one in sites-enabled called 000-default or default in sites-available?

    sites-available <--
    sites-enabled is just a symlink to the file in sites-available

  • IvanIvan Member
    edited April 2013

    @johnlth93 said: did you configure the SSL cert/key/and such?

    >

    Everything worked fine, I only had a 404 error, but I must've messed up after I addded NameNameVirtualHost *:443 in ports.conf and in /sites-available/default

    default-ssl is fine though, I added all the certs/key etc

    Edit: Alright, it's finally working. I didn't configure the ssl cert/keys/etc paths in default, but I did in default ssl. Phew. It's been more than 2 hours.. Well I'm a noob so what can I expect. Thanks for everything guys! It probably would have took me longer to figure it out if went on this myself. Never really played with vhost much so yeah, a simple thing could take me so long to figure out.

Sign In or Register to comment.