0

I am using MAMP and pointing to the project folder. After I access http://localhost, it does not show the website but shows index.html file. I also added db locally, the configuration file I also adjusted. How can I make it work?

Edit: Here is my httpd.conf file: https://pastebin.com/xvQ0CvzU

  • Welcome to JSE, please take our tour to see how we slightly differ from other Stack Exchanges sites. We also like to hear about your Joomla story if you'd care to add some text to your profile. Regarding your question, I am not sure that you have supplied enough details in your question. Seldom does a 4-sentence question provide sufficient diagnostic information for our volunteers to lend a hand. Perhaps edit your question to show us what you have configured, the relevant portion of your directory tree, and how you are accessing the index.html file in the address bar. – mickmackusa Jul 14 at 14:08
  • Also, if you are rolling out a new project, why not use the most current version of Joomla? – mickmackusa Jul 14 at 14:08
  • The website is using 3.9.15 version of Joomla. I updated the tag. – TheRoyality Jul 15 at 7:28
  • I added httpd.conf file in question. I followed Patrick suggestion, but looks like the file already has these settings. – TheRoyality Jul 15 at 7:36
  • What address you are trying to access, localhost:8888 or localhost ? I think default local MAMp address is localhost:8888 – webchun Jul 19 at 0:17
2

Joomla uses index.php as the base, so check the following:

  • Delete index.html if it exists

  • Check the .htaccess file if it exists for a DirectoryIndex directive. If it looks like:

    DirectoryIndex index.html index.php

    reverse the order of the two file names, or just remove the index.html part.

Additionally from the comments:

Modify your httpd.conf.

Looking at your paste bin try:

  • commenting out line 141 which is already defining the mime type - perhaps unnecessarily. I don't have MIME type definitions in my httpd.conf and it works fine, so it may be that the browser does the type interpretation itself without needing to be told by the server what to do with the file.

  • on line 258, change the DirectoryIndex directive from

    DirectoryIndex index.html

    to

    DirectoryIndex index.php index.html

    to help with managing the default pages.

| improve this answer | |
  • I deleted the index.html file and now every time I enter localhost, it downloads a file that contains index.php data. What could be the reason for that? .htaccess file does not contain DirectoryIndex directive. – TheRoyality Jul 14 at 11:21
  • That's to do with mime types for php files not being correct. So instead of it knowing it's code, it's loading it as text and not processing it. stackoverflow.com/questions/25819121/mamp-not-processing-php should help you adjust your MAMP settings. – Patrick Jackson Jul 14 at 23:30
  • Patrick, I added these settings, but no luck. Please see the httpd.conf in question details, maybe that gives more info. – TheRoyality Jul 15 at 7:37
  • Apologies - playing catch up, so sorry for delay. I just had a look at my XAMPP httpd.conf. Looking at your paste bin try: - commenting out line 141 which is already defining the mime type - perhaps unnecessarily. I don't have MIME type definitions in my httpd.conf and it works fine. - on line 258, change the DirectoryIndex directive from DirectoryIndex index.html to DirectoryIndex index.php index.html – Patrick Jackson Jul 21 at 1:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.