Answer the question
In order to leave comments, you need to log in
How to properly configure apache Sentos7?
Costs Centos7, ssh connection, installed apache 2.4.
There is no access to var/www/html, I uploaded the site to a separate folder. when trying to reach out, the error is: Forbidden
You don't have permission to access
File etc/httpd/conf/httpd.conf
ServerRoot "/etc/httpd"
Listen 80
Include conf.modules.d/*.conf
ServerRoot "/etc/httpd"
#Listen 12.34.56.78:80
Listen 80
Include conf.modules.d/*.conf
User apache
Group apache
# 'Main' server configuration
#
ServerAdmin [email protected]
<Directory />
AllowOverride none
Require all denied
Require all granted
</Directory>
DocumentRoot "/home/ha261287mev1/vipoc"
<Directory "/home/ha261287mev1">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
# Further relax access to the default document root:
<Directory "/home/ha261287mev1/vipoc">
Options Indexes FollowSymLinks
DirectoryIndex main.php
AllowOverride None
Require all granted
</Directory>
<VirtualHost *:80>
ServerName www.vipoc.com
DocumentRoot /home/ha261287mev1/vipoc
ServerAlias vipoc.com
ErrorLog /home/ha261287mev1/vipoc/error.log
CustomLog /home/ha261287mev1/vipoc/requests.log combined
</VirtualHost>
#
<IfModule dir_module>
DirectoryIndex index.php
</IfModule>
#
#
<Files ".ht*">
Require all denied
</Files>
ErrorLog "logs/error_log"
#
LogLevel warn
<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}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 \"%{Referer}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 granted
</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>
#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
MIMEMagicFile conf/magic
</IfModule>
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf
Answer the question
In order to leave comments, you need to log in
1. There are no folders in linux, there are directories.
2. What are the rights to the directory for the user from which apache is launched?
3. There are logs in var/log/httpd, including the error log, where you can see what the problem is.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question