How to enable Virtual Host on Xampp for Laravel 5.8 - apache

I have problem with creating virtual host. I am using Windows 7 x64 Professional.
When i try click on any admin menu dashboard got this error:
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
Apache/2.4.39 (Win64) OpenSSL/1.1.1c PHP/7.3.6
And in file C:\xampp-x64-7.3.6-1-VC15\apache\conf\extra\httpd-vhosts.conf I have this:
DocumentRoot "C:\xampp-x64-7.3.6-1-VC15\htdocs\gametrade150.lt\public"
ServerName gametrade150.lt
And of course I have restared my Apache server after adding this lines in those files.

Related

Error 404 - Not Found

Good Afternoon,
I'm elaborating a project and I've instaled php,mysql, apache2 in a virtualbox with ubuntu16.04.
I'm working locally and I've instaled laravel 5.3, I have an API running and created a new virtual host and placed the DocumentRoot my_folder and ServerName name_virtual_host. Then I went to my host files and placed a new line: 127.0.0.1 name_virtual_host. When I place on my browser http://name_virtual_host, the laravel page appears like it is supposed, but when I type in http://name_virtual_host/api, it gives back:
Not Found
The requested URL /api was not found on this server.
Apache/2.4.18 (Ubuntu) Server at name_virtual_host Port 80
it used to appear JSON.
How can I solve this?
Thanks.

I am not able to Start Apache on XAMPP on my system windows 7 32 bit

I am not able to run/start Apache through XAMPP on my system windows 7 32 bit. The problem is after installing everything is working okay but Apache is not running or starting.
Getting the following error message:-
Initializing Control Panel Windows Version: Windows 7 Ultimate 32-bit
Initializing module...
Checking for module existence...
Checking for required tools...
Checking for service (name="Apache2.4"): Service installed
error message : Apache Service detected with wrong path
Change XAMPP Apache and Control Panel settings or
Uninstall/disable the other service manually first
Found Path: "C:\Apache24\bin\httpd.exe" -k runservice
Expected Path: "c:\xampp\apache\bin\httpd.exe" -k
Checking default ports...
Executing "net start "Apache2.4""
Return code: 0
I think my system is missing Port 80 which is used by Apache server to run - even I checked it on my system but there is no such port 80 on my system.
How to resolve this issue?
Terminate/exit the programs like skype and other programs that are using the port 80 then start the appache server hope this will start the server. Once appache server start then you can start the skype or other programs. Or even you can change the port of appache server. You can follow this link for changing the server port.
How to change XAMPP apache server port?
Hop this will help you.
port 80 is a virtual port. It is being used by some other Program. Try executing netsh on command prompt.
The most common issue is skype. Refer this question to resolve it.
Apache Service detected with wrong path Change XAMPP Apache and Control Panel settings or Uninstall/disable the other service manually first Found Path: "C:\Apache24\bin\httpd.exe" -k runservice Expected Path: "c:\xampp\apache\bin\httpd.exe" -k
Your answer is on error message. The installed apache loaction is not inside the xampp folder. Try to reinstall or change the configuration.
I've encountered this issue on my Windows 10 environment. I've found that I've configured C:\xampp\apache\conf\extra\httpd-xampp.conf with a new SSLCertificateFile or SSLCertificateKeyFile in one of my virtual hosts that was not existing.
So in my httpd-xampp.conf I have the following:
## mywebsite.local config
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/mywebsite.local"
ServerName mywebsite.local
ServerAlias *.mywebsite.local
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "C:/xampp/htdocs/mywebsite.local"
ServerName mywebsite.local
ServerAlias *.mywebsite.local
## these lines are for my local SSL, here is the issue
SSLEngine on
SSLCertificateFile "crt/mywebsite.local/server.crt" ## this path may not exist
SSLCertificateKeyFile "crt/mywebsite.local/server.key" ## or even this line may not exist
</VirtualHost>
I've found that the path from SSLCertificateFile and SSLCertificateKeyFile doesn't exist.
I've fixed it and not it's working.
All the best!
I had the exact same issue on my system, Windows 10 64bit. I realized that I had edited the httpd.conf file in accordance with a security course I was taking and it rendered my configuration erroneous.
My fix was to uninstall XAMPP from the XAMPP uninstaller located in the XAMPP folder to completely erase all associated files as well as registry files! This was important because I had to do this once before but the uninstaller did not function properly for some reason.
Anyways, completely uninstalling it and reinstalling it leaving all the default settings made it work again. I know how it sounds... delete and re-install, but it finally got my server running, so it might serve as a solution for you and anyone who finds this post. Image of the Apache and my SQL server running without throwing errors.
Also, I found this out recently:
If you are learning to use XAMPP through a website like stackskills, the modules may not alert you to common issues. For example, if you need to change a directory, from C:/XAMPP/Apache to C:/Hacking Software/XAMPP/Apache, (notice the space and lack of underscore in the first part of the directory "HackingSoftware", XAMPP will read the first "space" as the end of an argument, and so you need to have the entire directory written in quotes like this: "C:/Hacking Software/XAMPP/Apache" or write it with underscores C:/Hacking_Software/XAMPP/Apache.
This syntax also applies to the use of the "Alias" command. See this link for more info: http://httpd.apache.org/docs/2.4/mod/core.html#directory.
Use this as a resource for other issues: http://httpd.apache.org/docs/2.4/mod/directives.html

Forcing localhost to use https results in a 403 error

I am working on a php website. I am working on it using Aptana with XAMPP. I recently changed my htaccess file to force my site to use https on the localhost. I haven't yet implemented a ssl certificate. When I try to access a webpage now, I am directed to a page that says:
Object not found!
The requested URL was not found on this server. If you entered the URL
manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Apache/2.4.10 (Unix) OpenSSL/1.0.1j PHP/5.6.3 mod_perl/2.0.8-dev Perl/v5.16.3
I found some solutions to this but I really want to know why this is occurring. I know that I can change the httpd.conf file to fix it but I still don't understand what is happening.

Wamp and laravel installation, virtual host works but localhost not(Not Found The requested URL / was not found on this server.)

I've been installing WAMP on a windows machine, then I install laravel framework, make the virtual host configurations and now i work correctly with that virtual host. When i type on the browser http://laravel.dev/ the applications works correctly but when i try to work with other projects on localhost the browser show me the next message:
Not Found
The requested URL / was not found on this server.
Apache/2.4.9 (Win64) PHP/5.5.12 Server at localhost Port 80
FYI when i type this
localhost/phpmyadmin/
Works fine.
Any suggestions?
I had the same issue. I just went to the httpd.conf file and checked if the following was correct:
# Virtual hosts
# Include conf/extra/httpd-vhosts.conf

Virtual host and subdomains on Wamp windows

I want to create virtual host and sub-domains for that host on local machine such that my localhost serve as a website like I do not need to write localhost in url bar:
localhost ---> mysite.com
---> sd1.mysite.com
---> sd2.mysite.com
actually I am using wordpress plugin WP Subdomains which makes sub-domain for main categories like.
cat1.localhost
cat2.localhost
but if we try to access cat1.localhost browser error Server not found which is definitely because we did not create sub-domain named cat1 for localhost.
I google but no solution found which exactly solve my problem.
I also followed http://www.talkphp.com/general/2170-setup-sub-domain-wamp.html
but following error appear:
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, admin#localhost and inform
them of the time the error occurred, and anything you might have done
that may have caused the error.
More information about this error may be available in the server error
log.
Okay got it....
I followed http://www.talkphp.com/general/2170-setup-sub-domain-wamp.html but skip step 3:
Open up: C:\wamp\bin\apache\apache2.2.6\conf\extra\httpd-vhosts.conf.
and in httpd.conf comment DocumentRoot "E:/wamp/www/" and add
DocumentRoot "E:/wamp/www/wordpress"
and it work. :)
Please follow the link below. I tried this and working fine for me.
http://www.axertion.com/tutorials/2012/03/how-to-setup-local-subdomains-using-wampserver/