Wordpress apache routing is wrong

Asked 2 years ago, Updated 2 years ago, 93 views

Installing and trying wordpress in a virtual environment.
The file configuration includes wp-admin, etc., just below /var/www/html/wordpress.
PHP is running in a php-fpm eventMPM configuration.

httpd.conf

 DocumentRoot/var/www/html/wordpress/
<Directory"/var/www/html/wordpress/">
        Options - Indexes + FollowSymlinks
        AllowOverride All
        Require all graded
</Directory>

.htaccess

RewriteEngine On
RewriteBase/
RewriteRule^index\.php$ - [L]
US>RewriteCon%{REQUEST_FILENAME}!-f
RewriteCon%{REQUEST_FILENAME}!-d
RewriteRule./index.php [L]
</IfModule>
# END WordPress

In this situation, accessing with the left address below replaces the address to the right of -> with the result to the right of :.

IP->IP: Testing 123... Apache Screen
IP/index.php->IP:Testing 123...
IP/tekitou->IP/tekitou:viewable (site top)
IP/wp-admin/edit.php->IP/wp-admin/edit.php: Connectable (editing screen)

If you look at .htaccess, whether it's index.php or tekitou, it only looks like you're accessing index.php, but I don't know why.
I would appreciate it if you could tell me how to display the top screen with IP and how to display the top screen with IP/index.php URL as IP.

httpd.conf Excerpt valid lines only

ServerRoot"/etc/httpd"
Listen 80
Include conf.modules.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
<Directory/>
    AllowOverride none
    Require all denied
</Directory>
DocumentRoot"/var/www/html/wordpress/"
<Directory"/var/www">
    AllowOverride None
    Require all graded
</Directory>
<Directory"/var/www/html">
    Options Indexes FollowSymlinks
    AllowOverride None
    Require all graded
</Directory>
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>
<Files ".ht*">
    Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
    LogFormat "%h%l%u%t\"%r\"%>s%b\"%{Refer}i\"%{User-Agent}i\""combined
    LogFormat "%h%l%u%t\"%r\"%>s%b" common
    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h%l%u%t\"%r\"%>s%b\"%{Refer}i\"\"%{User-Agent}i\"%I%O" combinedio
    </IfModule>
    CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
    ScriptAlias/cgi-bin/"/var/www/cgi-bin/"
</IfModule>
<Directory"/var/www/cgi-bin">
    AllowOverride None
    Options None
    Require all graded
</Directory>
<IfModule mime_module>
    TypesConfig/etc/mime.types
    AddType application/x-compress.Z
    AddType application/x-gzip.gz.tgz
    AddType text/html.shtml
    AddOutputFilter INCLUDES.shtml
</IfModule>
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
    MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional conf.d/*.conf
<Directory "/var/www/html/wordpress">
        Options - Indexes + FollowSymlinks
        AllowOverride All
        Require all graded
</Directory>

php apache wordpress

2022-09-30 14:12

1 Answers

The DirectoryIndex appears to have been missing.

<Directory "/var/www/html/wordpress">
Options-Indexes+FollowSymlinks
AllowOverride All
Require all graded
DirectoryIndex index.html index.php


2022-09-30 14:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.