I was deploying a web application using the yii2 framework, it was working fine on my previous dev machine, I’m using xampp as my webserver. I already copied the application on default directory /var/www/html/myfolder. But I got an error 404 Not Found (The requested URL was not found on this server). I’m using Apache/2.4.29. Is there anything I need to setup or reconfigure? Do I need to install yii framework too?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi @solutionbasecorp,
When using Apache, you need to configure your domain in a virtualconfig file so that Apache knows from where to load the files.
Since you are using ubuntu, go to folder
Inside create he configuration file like so
where DomainName, is your actual domain name. The most basic configuration file looks like so
Again, remember to put our own DocumentRoot folder and in the ServerName and SeverAlias spaces to put your actual domain name.
Now to enable the file you need to run
That’s it, you should now have a working website.
Regards, KFSys