Error 404 - Not Found - apache

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.

Related

How to enable Virtual Host on Xampp for Laravel 5.8

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.

hostname not working in another Tomcat server

I have been using
127.0.0.1 localhost
127.0.0.12 www.example.com
in my hosts file in a previous tomcat server.
I downloaded another version of tomcat and the hostname www.example.com is not working it gives me 404 error I think there is a conflict when I tried for example:
127.0.0.1 localhost
127.0.0.12 www.example-s.com
It worked. But, I need my old hostname.
How do I solve this problem?
Please think twice:
You got an 404 error - which is an http status code!
This means that your DNS is working!
The 404 error means that your tomcat could not find the requested resource.
For example:
http://www.example.com/
resulting in 404 error will mean that maybe you have deleted the
Tomcat:webapps/ROOT
directory. Or you have changed the server.xml config.

Bitnami djangostack Not serving any pages degault/app

I am new to cloud jargon. I initiated a GCE instance sometime back and installed bitnami djangostack. It all worked fine.
One fine day due to some issue instance restarted and changed my server IP.On typing new IP in browser Apache2 Debian page was back.This previously showed Bitnami default page.
I restarted each service using /opt/bitnami/ctl script but apache was not running.
Searched and changed default port to 8080 and from 443 to 8443 in httpd.conf file.
Apache started. But still when I type on browser new server IP - I get connection refused error.Also cannot load any apps using http://serverip/Project/ which previously used to work.
Apache Error log says
localhost:8443:0 server certificate does NOT include an ID which matched server name.
Searched and changed below in /apache2/conf/extra/httpd-ssl.conf
ServerName to localhost from www.example.com
But nothing is working and I still get same error.
Can anyone help.

Https and http not working together on MAMP Pro

I created a host on Mamp pro using their GUI app which is called "site1". If I go to https://site1/, it is working fine. If I go to http://site1, then it loads the root of http://localhost.
Based on GUI,
http//localhost's document root is applications/mamp/htodocs/
http//localhost's document root is applications/mamp/htodocs/site1/
If I disable https, then the http site works correctly. I need the both protocol for the site. How could I fix that? Any help? I am also unable to recognize the correct httpd.conf files which are associated with these hostnames.
On the GUI management window, I just added the following code into the additional virtual host parameters and both http and https started working fine together.
ServerName site1
DocumentRoot "/Applications/MAMP/htdocs/site1"
It would still be good to know where and how MAMP is creating the conf files.

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