0

I have setup a few wordpress with centos, apache in the same server and they all works fine. But somehow this is with this wordpress, when I go to the domain.com it just shows

Index of /
    Name    Last modified   Size    Description
    cgi-bin/    2020-07-20 12:53    -    

I googled but everyone's answer is either because there's a subdirectory installed by accident which it's not though. Also this is not installed through a cpanel.

this is how my root directory of the wordpress looks like

drwxr-xr-x.  5 apache apache  4096 Sep 28 02:58 .
drwxr-xr-x. 17 apache apache  4096 Sep 27 20:25 ..
-rwxr-xr-x.  1 apache apache    19 Sep 14  2018 3f361b82411a33ef76.txt
-rwxr-xr-x.  1 apache apache    16 Sep 14  2018 1D3AE47DEBA.html
-rwxr-xr-x.  1 apache apache   418 Sep 14  2018 index.php
-rwxr-xr-x.  1 apache apache 19935 Sep 14  2018 license.txt
-rwxr-xr-x.  1 apache apache  7415 Jun 11 00:34 readme.html
-rwxr-xr-x.  1 apache apache  6878 Apr 30 00:34 wp-activate.php
drwxrwxrwx.  9 apache apache  4096 Sep 14  2018 wp-admin
-rwxr-xr-x.  1 apache apache   364 Sep 14  2018 wp-blog-header.php
-rwxr-xr-x.  1 apache apache  1889 Sep 14  2018 wp-comments-post.php
-rwxr-xr-x.  1 apache apache  3312 Sep 14  2018 wp-config.php
-rwxr-xr-x.  1 apache apache  2853 Sep 14  2018 wp-config-sample.php
drwxrwxrwx.  7 apache apache  4096 Sep 28 02:57 wp-content
-rwxr-xr-x.  1 apache apache  3669 Sep 14  2018 wp-cron.php
drwxrwxrwx. 18 apache apache 12288 Sep 14  2018 wp-includes
-rwxr-xr-x.  1 apache apache  2422 Sep 14  2018 wp-links-opml.php
-rwxr-xr-x.  1 apache apache  3306 Sep 14  2018 wp-load.php
-rwxr-xr-x.  1 apache apache 37804 Apr 30 00:34 wp-login.php
-rwxr-xr-x.  1 apache apache  8048 Sep 14  2018 wp-mail.php
-rwxr-xr-x.  1 apache apache 16246 Sep 14  2018 wp-settings.php
-rwxr-xr-x.  1 apache apache 30091 Sep 14  2018 wp-signup.php
-rwxr-xr-x.  1 apache apache  4620 Sep 14  2018 wp-trackback.php
-rwxr-xr-x.  1 apache apache  3065 Sep 14  2018 xmlrpc.php

I even seen posts about changing the httpd.conf file

<IfModule dir_module>
    DirectoryIndex  index.php index.html
</IfModule>

actually the above is already there.

This is how my virtualhost looks like which is copied then modified the directory and servername from other working wordpress

<VirtualHost *:80>
    ServerName www.domain.com
    ServerAlias domain.com
    DocumentRoot /var/www/lci
    <Directory "/var/www/lci">
        Options Indexes FollowSymLinks
        Order allow,deny
        Allow from all
        AllowOverride All
    </Directory>
</VirtualHost>

What might be the possibility of any settings I might have forgotten?

If I click into the cgi-bin like I get a 403 forbidden though.

Thanks in advance for any suggestions and advices

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89
Dora
  • 341
  • 1
  • 5
  • 15
  • Hm, OK. Did Apache restart successfully with this configuration? What directory did you provide a listing of? Is PHP installed? – Michael Hampton Sep 28 '20 at 04:23
  • @MichaelHampton 1. Apache restarted fine without any error, the directory is the one I put in the virtual host config above `/var/www/lci` and that directory contain the list I provided with 2nd screenshot. For sure php is installed as php72 and as mentioned, the same server has few other wordpress projects too all running fine within their own directory – Dora Sep 28 '20 at 04:26
  • Do you have more than one VirtualHost for that domain? Do you get a redirect when you request that domain? – Gerald Schneider Sep 28 '20 at 06:25
  • @GeraldSchneider that domain is only for that domain in one virtuallhost....therre's no same virualhost with the same domain – Dora Sep 28 '20 at 07:52
  • Do you see the requests in the Apache log? Is the domain resolving to the correct IP address? – Gerald Schneider Sep 28 '20 at 08:05
  • @GeraldSchneider I do not see anything logged for this domain though. – Dora Sep 28 '20 at 21:12
  • @GeraldSchneider I was looking at the log here `/var/log/httpd/access_log` should be looking at the correct place? – Dora Sep 28 '20 at 21:21
  • @GeraldSchneider omg you gave me an idea that what if the other developer did not setup dns correctly because I just pinged the site the ip returned doesn't seem correct omg if this is the reason I will *arg* – Dora Sep 28 '20 at 21:31

0 Answers0