Creating virtual host for laravel in Lamp
Solved
Basically I just created the virtual host but I noticed some strange behaviour in laravel after placing subdomain on top of file it worked. I didn't knew that laravel would process suddomain routes first and if you place subdomain routes after some routes then it didn't work then you would not get desired routes.
About apache it seems that I couldn't make the subdomain work and from what I have learned in local environment how it works is that domain must come first here.
ServerAlias blog.example.dev
didn't work in ServerName example.dev
domain.
I created two seperate virtual host one for example.dev
and another for blog.example.dev
. Also thanks to parthu_panther I changed the .dev
to another .local
.
Also the hosts file was same
127.0.0.1 example.local
127.0.0.1 blog.example.local
Please correct me if I am wrong.
laravel virtual host setup not showing front-end
You need to address your public folder,
<VirtualHost *:80>
DocumentRoot "C:\XAMPP\htdocs\blog\public"
ServerName blog.local
</VirtualHost>
Related Topics
Php: Locale Aware Number Format
PHP String Interpolation Syntax
PHP - Returning the Last Line in a File
How to Set the Cookie Content with Curl
Overwrite Line in File with PHP
Call to Undefined Method Pdo::Execute()
Upgrading PHP on Centos 6.5 (Final)
Installing Mcrypt Extension for PHP on Osx Mountain Lion
After Array_Filter(), How to Reset the Keys to Go in Numerical Order Starting at 0
Best Way to Access Exchange Using PHP
Laravel 5.2 Cors, Get Not Working with Preflight Options
How to Use Array_Unique on an Array of Arrays
How to Display Special Characters in PHP
How to Execute a Stored Procedure in PHP Using SQLsrv and "" Style Parameters
PHP Datetime Round Up to Nearest 10 Minutes
Flip Associative Array and Store New Values in Subarrays to Prevent Losing Duplicated Values
Why a Function Checking If a String Is Empty Always Returns True