crear servidor virtual, virtual hosts windows

confugurar virtual host para laravel i codeigniter que no tienen index.php en la raiza del proyecto si no en public

  • crear servidor virtual, virtual hosts windows

    crear servidor virtual, virtual hosts windows

    confugurar virtual host para laravel i codeigniter que no tienen index.php en la raiza del proyecto ...

1- Modificar fitxer: C:\Windows\System32\drivers\etc\hosts

127.0.0.1       localhost
::1             localhost
#--------------------------------------------------------------------
#codeigniter
#--------------------------------------------------------------------	

127.0.0.1       ci4admin.test
127.0.0.1       autonomos.test
127.0.0.1      	ci4kickoff.test

#--------------------------------------------------------------------
#laravel
#--------------------------------------------------------------------	

127.0.0.1      	administracio.test
127.0.0.1      	zenblogl11.test
127.0.0.1       yajra.test


#--------------------------------------------------------------------
#php
#--------------------------------------------------------------------

127.0.0.1       synology.test
127.0.0.1       puigba_beauty.test
127.0.0.1       diario_ventas.test


#--------------------------------------------------------------------
# wordpress
#--------------------------------------------------------------------	

127.0.0.1       wpautonomos.test
127.0.0.1       wptw.test

2- Modificar el fitxer: C:\xampp\apache\conf\extra\httpd-vhosts.conf

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot "C:/xampp/htdocs"

    <Directory "C:/xampp/htdocs">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName synology.test
    DocumentRoot "C:/xampp/htdocs/PROJECTES/PHP/synology"

    <Directory "C:/xampp/htdocs/PROJECTES/PHP/synology">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

#--------------------------------------------------------------------
#laravel
#--------------------------------------------------------------------	


<VirtualHost *:80>
    ServerName administracio.test
    DocumentRoot "C:/xampp/htdocs/PROJECTES/LARAVEL/administracio/public"

    <Directory "C:/xampp/htdocs/PROJECTES/LARAVEL/administracio/public">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName zenblogl11.test
    DocumentRoot "C:/xampp/htdocs/PROJECTES/LARAVEL/zenblogl11/public"

    <Directory "C:/xampp/htdocs/PROJECTES/LARAVEL/zenblogl11/public">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName yajra.test
    DocumentRoot "C:/xampp/htdocs/PROJECTES/LARAVEL/yajra/public"

    <Directory "C:/xampp/htdocs/PROJECTES/LARAVEL/yajra/public">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName puigba_beauty.test
    DocumentRoot "C:/xampp/htdocs/PROJECTES/LARAVEL/puigba_beauty/public"

    <Directory "C:/xampp/htdocs/PROJECTES/LARAVEL/puigba_beauty/public">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>


#--------------------------------------------------------------------
#Codeigniter
#--------------------------------------------------------------------	

<VirtualHost *:80>
    ServerName ci4admin.test
    DocumentRoot "C:/xampp/htdocs/PROJECTES/CODEIGNITER/ci4admin/public"

    <Directory "C:/xampp/htdocs/PROJECTES/CODEIGNITER/ci4admin/public">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName autonomos.test
    DocumentRoot "C:/xampp/htdocs/PROJECTES/CODEIGNITER/autonomos/public"

    <Directory "C:/xampp/htdocs/PROJECTES/CODEIGNITER/autonomos/public">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName ci4kickoff.test
    DocumentRoot "C:/xampp/htdocs/PROJECTES/CODEIGNITER/ci4kickoff/public"

    <Directory "C:/xampp/htdocs/PROJECTES/CODEIGNITER/ci4kickoff/public">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

#--------------------------------------------------------------------
#Wordpress
#----------

<VirtualHost *:80>
    ServerName wptw.test
    DocumentRoot "C:/xampp/htdocs/PROJECTES/WORDPRESS/wptw"

    <Directory "C:/xampp/htdocs/PROJECTES/WORDPRESS/wptw">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName wpautonomos.test
    DocumentRoot "C:/xampp/htdocs/PROJECTES/WORDPRESS/wpautonomos"

    <Directory "C:/xampp/htdocs/PROJECTES/WORDPRESS/wpautonomos">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>


6 posts relacionats

  • Author
    Joan Puig

    windows clonar desde github i configurar projecte local amb github desktop

    GitHub és una plataforma per gestionar, compartir i col·laborar en projectes de programació. Perm... READ MORE
  • Author
    Joan Puig

    gitignore

    Es un archivo de texto simple donde defines patrones de archivos y carpetas que Git debe ignorar.... READ MORE
  • Author
    Joan Puig

    la meva primera web a localhost

    Aquí tens un resum pas a pas per instal·lar i configurar cada tecnologia a Windows 11 amb XAMPP ja... READ MORE
  • Author
    Joan Puig

    que es localhost?

    localhost és un terme utilitzat en informàtica que es refereix a l'ordinador o dispositiu on s'est... READ MORE
  • Author
    Joan Puig

    hosts windows

    C:\Windows\System32\drivers\etc\hosts... READ MORE
  • Author
    Joan Puig

    permisos en linux ubuntu server

    refieres a una futura versión o a la 22.04), es común enfrentarse a problemas de permisos al traba... READ MORE