-
Create Visual host
How Create Visual host Linux(Ubuntu)
- Open a terminal window.
- Navigate to the Apache configuration directory by running the following command:
cd /opt/lampp/etc/extra
- Create a new virtual host configuration file using a text editor. For example:
Replace "mysite" with the desired name for your virtual host.
sudo nano mysite.conf
- In the editor, add the following content to the configuration file:
Replace "/path/to/your/project" with the actual path to your project directory. Replace "mysite.local" with the desired domain name for your virtual host.
<VirtualHost *:80> DocumentRoot "/path/to/your/project" ServerName mysite.local <Directory "/path/to/your/project"> Require all granted AllowOverride All </Directory> </VirtualHost>
- Save the file and exit the text editor.
- Open the Apache configuration file for editing by running the following command:
sudo nano /opt/lampp/etc/httpd.conf
- Uncomment the following line by removing the "#" symbol:
Save the file and exit the text editor.
# Include etc/extra/httpd-vhosts.conf
- Open the virtual hosts configuration file by running the following command:
sudo nano /opt/lampp/etc/extra/httpd-vhosts.conf
- Add the following content to the file:
Replace "/path/to/your/project" with the actual path to your project directory. Replace "mysite.local" with the desired domain name for your virtual host.
NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "/path/to/your/project" ServerName mysite.local <Directory "/path/to/your/project"> Require all granted AllowOverride All </Directory> </VirtualHost>
- Save the file and exit the text editor.
- Open the hosts file for editing by running the following command:
sudo nano /etc/hosts
- In the editor, add the following line at the end of the file:
Replace "mysite.local" with the same domain name you used in the virtual host configuration file.
127.0.0.1 mysite.local
- Save the file and exit the text editor.
- Restart the Apache server to apply the changes by running the following command:
sudo /opt/lampp/lampp restart
- Now you should be able to access your virtual host by opening a web browser and entering "http://mysite.local" as the URL.
I apologize for any inconvenience caused, and I hope these steps help you set up the virtual host successfully.
- install laravel 10
- install mcamara/laravel-localization
- install Astrotomic/laravel-translatable
- install laravel breeze