Apache's localhost base URL displays Laravel welcome screen [UBUNTU 16.04] - apache

When I access localhost or 127.0.0.1, I should be displayed the index.html default page from apache.
However, when I access it, it displays the Laravel welcoming screen.
I do have some Laravel projects under /var/www/html, indeed.
But it seems Apache is confused as to what page to display in the root directory, displaying Laravel's welcome screen instead of the usual index.html.
This would not be much of a problem, but it also happens that, whenever accessing any other project which is not Laravel-based, i'm faced with Laravel's 404 screen.
Any ideas as to what happened here?

Some minutes after typing this question, i found the answer myself.
I deleted the file /etc/apache2/sites-enabled/000-default.conf, which sets the default response for localhost request.
So, Apache took Laravel's page as the default for answering any request to the server.
Here's a gist I made for recovering this file.

Related

Is there a difference in page paths when on localhost verses deployed?

My app is created in next.js and works great in localhost. When I deployed it in heroku, only the front page shows up and all page paths do not work even though they are correctly inputted in the browser. The only page that is connected to the index.js file in my page paths is the front page. Do the other pages need to also be connected to the indec.js file? I am terribly lost with this issue since the site works perfectly in localhost. In heroku every page path besides / has a 404 error. I didn't add any code to this question since no one file seems relevant to the issue. I've been searching all over for an answer to this issue but can't seem to find any relevant information online since the app is deployed successfully it just won't render any file paths besides /.
Thank you in advance for any help you can offer. I really appreciate it!
Applications are ran differently on localhost and when deployed to the server. Since you added react tag on the post, I assume you are trying to deploy react native app on Heroku, there is lots of information on internet how to do it.
For example this post.
Anyway first you need to build your app correctly, so static files would be generated (you didn't mentioned how you are running that app).
To your question:
Relative paths are the same on both local and server, but absolute paths will be different.
But for your 404 error I see that no static content are found on the root path.

Where is the "Index of /" page of Apache Localhost?

I'm wondering if this page is configured in the Browser or if Apache defines it. Where can I find the file?
For clearity of what I mean, here's a Screenshot:
This isn't really a page, Apache is just listing the directory content, it is not a HTML file being rendered.
The location you are seeing varies from installation to installation, but it is usually something like /var/www/htdocs.

SSL setup configuration in symfony 1.4

I have a site with symfony 1.4, and installed the SSL certificate in the server, the home page works but when I click in any link I get an error 404. But if I use the Dev mode from symfony I am able to navigate through all the website... weird to me.
I tried to install the plugin sfSslRequirementPlugin - 2.0.0, when I enable it I get this error when loading the page: net::ERR_TOO_MANY_REDIRECTS for any page.
Any idea??
Yes, this is because of some code defects in .htaccess file. Can you please send me .htaccess file so that we can investigate more on this issue.
The error net::ERR_TOO_MANY_REDIRECTS is because of .htacess as it is redirecting the page. I had faced the same issue once.

XAMPP wont open simplest route with laravel, if it is not a home route

So I am having huge problems with XAMPP today ( I don't know why, never had them before ).
It gives me the "route not found exception" when I want to access any other route than the basic home "/" route.
On the other hand, if I use artisan serve and visit the exact same route in my browser, everything works as expected.
I tried googling this for the whole afternoon today, losing my mind already! Tried reinstalling XAMPP, tried making sure mod_rewrite is enabled etc. Everything is ok, it still wont work!
Can anyone please help with this issue? Here are the images
Route file
XAMPP browser
Artisan browser
Check your VirtualHost, you probably have .htaccess files disabled (AllowOverride is not set to All).
Nevermind, the problem kinda fixed itself, and I still have no idea how... I reinstalled XAMPP the second time and it worked out of the box...
Sometimes, I swear... it seems like development is just screwing with your head on purpose.

Newly transferred Drupal site - Clean URL broken

I had a drupal site on my local wamp server but after having to reformat my computer and reinstalling wamp and all that, Clean URLS is messing up. I made sure my apache had mod_rewrite enabled and after that i just get a 404 error for everything. When i try to login i also get a 404 error. What can i do? I've looked for a while and cant find anything.
I believe it's mod_rewrite that needs to be enabled.
Got it to work. Had to navigate to the login page directly (/?q=user) rather then just using the login block. Then navigated directly to the clean url page (www.mydomain.com/?q=admin/config/search/clean-urls) and disabled them.