1

Apache (from XAMPP) dont work like expected. When I type https://myVirtualHost, I would join "C:/xampp/htdocs/myApplication/public/" But apache show me "C:/xampp/htdocs/index.php"

Here my VirtualHost declaration :

<VirtualHost *:433>
    ServerName myVirtualHost
    DocumentRoot "C:/xampp/htdocs/myApplication/public"
    ErrorLog "logs/myApplication-error.log"
    CustomLog "logs/myApplication-access.log" common
    SSLEngine on
    SSLCertificateFile "C:/xampp/apache/conf/ssl.crt/server.crt"
    SSLCertificateKeyFile "C:/xampp/apache/conf/ssl.key/server.key"
</VirtualHost>

And my "C:\Windows\System32\drivers\etc\hosts" declaration :

127.0.0.1 myVirtualHost

Any idea ? Thanks

EDIT : I precise : Include conf/extra/httpd-vhosts.conf is active in "httpd.conf" and work well for all "*80 virtual hosts. Only *443 doesn't work.

1 Answer 1

1

Please try to check the file: httpd.conf

Uncomment:

Include etc/extra/httpd-vhosts.conf

If you uncommented it and set your setting on the httpd-vhosts.conf, please restart.

Here's I know on my practice:

https://github.com/oliguo/Server-Deployment/blob/master/XAMPP.md#ssl-setup-with-xamppauthorized-with-godaddy

NameVirtualHost *:443

<VirtualHost *:443>
    DocumentRoot "/opt/lampp/htdocs/youdomain_A"
    ServerName youdomain_A
    SSLProtocol all -SSLv2 -SSLv3
    SSLCertificateFile "/opt/lampp/etc/ssl.crt/youdomain_A/youdomain_A.crt" ->from godady
    SSLCertificateKeyFile "/opt/lampp/etc/ssl.key/youdomain_A.key"
    SSLCertificateChainFile "/opt/lampp/etc/ssl.crt/youdomain_A/gd_bundle-g2-g1.crt" ->from godaddy
    <Directory "/opt/lampp/htdocs/youdomain_A/">
        Options Includes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog "/opt/lampp/htdocs/youdomain_A/domain_ssl_error_log"
    ErrorDocument 404 https://youdomain_A 
</VirtualHost>
2
  • Thanks for your reply but this line is always active :)
    – bArraxas
    Mar 25, 2020 at 12:43
  • @bArraxas is there 'NameVirtualHost *:443' and check the httpd.conf is there a thing like ErrorDocument 404
    – Oliver Guo
    Mar 25, 2020 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.