0

I have moved all the files to a server via FTP. The problem is that the website doesn't show pages but an index list. I have tried different things like adding "DirectoryIndex index.html index.php" in the .htaccess file and I have a index.php file in the www folder but these solutions don't seem to work for me. I'm currently using Windows 7, Apache and WAMP.

Here is the root folder: enter image description here

2 Answers2

0

hope this help you :)

Apache needs to be configured to recognize index.php as an index file.

The simplest way to accomplish this..

Create a .htaccess file in your web root.

Add the line...

    DirectoryIndex index.php

Here is a resource regarding the matter... http://www.twsc.biz/twsc_hosting_htaccess.php

Edit: I'm assuming apache is configured to allow .htaccess files. If it isn't, you'll have to modify the setting in apache's configuration file (httpd.conf)

source

0

-rw-------

These files don't appear to have enough permissions. They should be public readable if they are to be served to all users. Otherwise, the server won't be able to respond with the appropriate DirectoryIndex and if directory indexes are enabled then Apache will generate a directory listing.

They should probably be -rw-r--r-- or 0644 ... read/write by owner and read for group and read for public.

The same for your directories... drwx------ should probably be drwxr-xr-x or 0755.


When this has been fixed, you should probably disable Apache directory indexes. For example, add the following to your .htaccess file or server config:

Options -Indexes

Try this now (with insufficient file perms) and you'll probably get a 403.

MrWhite
  • 43,179
  • 8
  • 60
  • 84
  • How do I change the permissions? –  Jun 21 '17 at 18:07
  • The FTP client usually has the option to change perms. Which client are you using? Do you have any other access to the server? SSH perhaps? – MrWhite Jun 21 '17 at 18:10
  • I use Filezilla. I'm new to FTP and don't know SSH. I will have a look at Filezilla again in terms of permissions. –  Jun 21 '17 at 18:23
  • In FileZilla you can right-click the file and select "File permissions..." from the context menu. Type the numeric value or check the boxes and click "OK". – MrWhite Jun 21 '17 at 19:10
  • "They should be public readable if they are to be served to all users" This is misleading. If user/group 1373 actually is the Apache user/group, it's perfectly fine. Only Apache needs to be able to read the files. – Capsule Jun 22 '17 at 01:42