Mostrando entradas con la etiqueta Servidor virtual. Mostrar todas las entradas
Mostrando entradas con la etiqueta Servidor virtual. Mostrar todas las entradas

Crear servidor virtual con https

En C:\xampp\apache\conf\extra\httpd-vhosts.conf:
# http
<virtualhost>
    DocumentRoot "C:/xampp/htdocs/probando"
    DirectoryIndex index.php
   ServerName probando
    <directory "C:/xampp/htdocs/probando">
       Options All
       AllowOverride All
       Order Allow,Deny
       Allow from all
    </directory>
</virtualhost>

# https
<virtualhost>
    DocumentRoot "C:/xampp/htdocs/probando"
    DirectoryIndex index.php
    ServerName probando
    SSLEngine on
    SSLCertificateFile "conf/ssl.crt/server.crt"
    SSLCertificateKeyFile "conf/ssl.key/server.key"
    <directory "C:/xampp/htdocs/probando">
       Options All
       AllowOverride All
       Order Allow,Deny
       Allow from all
    </directory>
</virtualhost>

Asegurarse que en c:/xampp/apache/conf/extra/httpd-ssl.conf esté: Listen 443
...
<virtualhost _default_:443="">
...
    ServerName localhost:443
</virtualhost>

En C:\xampp\apache\conf\httpd.conf debes tener descomentado:
LoadModule ssl_module modules/mod_ssl.so
Si aún así diese algún problema cambiar entonces el puerto 443 por 4433

Servidor virtual

Servidor virtual para crear dominios virtuales:

C:\WINDOWS\system32\drivers\etc\hosts
En el httpd-vhosts.conf:
127.0.0.1 laravel-prueba.com
C:\xampp\apache\conf\extra\httpd-vhosts.conf
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/Alejandria/public"
    DirectoryIndex index.php     
    ServerName laravel-prueba.com
    <Directory "C:/xampp/htdocs/Alejandria/public">
        Options All
        AllowOverride All
        Order Allow,Deny
        Allow from all
    </Directory>
</VirtualHost>

Especial agradecimiento a Carlos Sierra García