ssl problem

Problems with the Windows version of XAMPP, questions, comments, and anything related.

ssl problem

Postby brettcarr » 13. April 2011 23:33

I have just installed xamp on windows 7 im useing virtualhost, i need ssl to run correctly. I can go to https://myserver/xamp/ no problem but when i try to go to my site it says the file is missing error 404. I have updated my httpd-vhost file
This is what i have in the vhost file

Code: Select all
NameVirtualHost *:80
NameVirtualHost *:443

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
##<VirtualHost *:80>
    ##ServerAdmin postmaster@dummy-host.localhost
    ##DocumentRoot "C:/xampp/htdocs/dummy-host.localhost"
    ##ServerName dummy-host.localhost
    ##ServerAlias www.dummy-host.localhost
    ##ErrorLog "logs/dummy-host.localhost-error.log"
    ##CustomLog "logs/dummy-host.localhost-access.log" combined
##</VirtualHost>

##<VirtualHost *:80>
    ##ServerAdmin postmaster@dummy-host2.localhost
    ##DocumentRoot "C:/xampp/htdocs/dummy-host2.localhost"
    ##ServerName dummy-host2.localhost
    ##ServerAlias www.dummy-host2.localhost
    ##ErrorLog "logs/dummy-host2.localhost-error.log"
    ##CustomLog "logs/dummy-host2.localhost-access.log" combined
##</VirtualHost>
<VirtualHost *:80>
    ServerAdmin admin@localhost
    DocumentRoot "C:/server/www/myserver/public_html"
    ServerName myserver
    ServerAlias www.myserver
    <directory "C:/server/www/myserver/public_html">
    AllowOverride All
   Options Indexes FollowSymLinks
    Order allow,deny
    Allow from all
</directory>
</VirtualHost>
<virtualhost *:443=""> 
DocumentRoot "C:/server/www/myserver/public_html" 
ServerName myserver 
ServerAlias myserver 
SSLEngine on 
SSLCertificateFile conf/ssl.crt/server.crt 
SSLCertificateKeyFile conf/ssl.key/server.key 
</virtualhost> 

What am i missing???? oh yes and i have a file called .htaccess in the main directory of my website this is whats in there

Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine on
# For HTTPS pages:
RewriteCond %{HTTPS} off
RewriteRule ^(checkout\.php|billing\.php|final\.php|admin/(.*))$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>

Please can someone help i really stuck with this

Ihave updated my httpd:ssl.conf for to point to my web folder


Code: Select all
<VirtualHost _default_:443>
    #   General setup for the virtual host
    DocumentRoot "C:/server/www/myserver/public_html"
    ServerName myserver:443
    ServerAdmin webmaster@localhost
    ErrorLog "logs/error.log"
    <IfModule log_config_module>
        CustomLog "logs/access.log" combined

And now i get this error

Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.
Error 403

what do i do to fix this
Last edited by brettcarr on 14. April 2011 03:02, edited 1 time in total.
brettcarr
 
Posts: 2
Joined: 13. April 2011 23:02

Re: ssl problem

Postby Sharley » 14. April 2011 00:08

Read the \xampp\apache\logs\error.log file for clues about error 404 file not found errors.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: ssl problem

Postby brettcarr » 14. April 2011 02:59

I also updated my httpd-ssl.conf to point to my virtualhost

Code: Select all
<VirtualHost _default_:443>
    #   General setup for the virtual host
    DocumentRoot "C:/server/www/myserver/public_html"
    ServerName myserver:443
    ServerAdmin webmaster@localhost
    ErrorLog "logs/error.log"
    <IfModule log_config_module>
        CustomLog "logs/access.log" combined

Now i get

Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
Im getting closer... i think ... how do i fix this
brettcarr
 
Posts: 2
Joined: 13. April 2011 23:02

Re: ssl problem

Postby Sharley » 14. April 2011 05:28

Which version of XAMPP are you using?

Sharley wrote:Read the \xampp\apache\logs\error.log file for clues about error 404 file not found errors.
Same applies for 403 errors - have you read it yet?

BTW no need to change the localhost vhost default entries in the ssl.conf file as you have covered your ssl settings in your vhost conf file - only duplicating and confusing the issues.

Seems you are just changing configurations without knowing much about how they will affect your server and the consequence is the resulting errors.

There is excellent documentation reading on the Apache web site which will be a good investment in your time.
http://httpd.apache.org/docs/2.2/
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 150 guests