K
K
khodos_dmitry2020-03-10 13:38:02
Apache HTTP Server
khodos_dmitry, 2020-03-10 13:38:02

Why can't I set up apache virtual hosts on CentOS 7?

In the folder where the rest of the .conf files are, I create a new site3.conf file with the following content:

<VirtualHost *:80>
  ServerName otchet.org
  ServerAlias www.otchet.org
  DocumentRoot /home/otchet/html/otchet
  AssignUserID otchet otchet
  CustomLog /home/otchet/logs/otchet.org.access.log combined
  ErrorLog /home/otchet/logs/otchet.org.error.log
  DirectoryIndex index.php
  <Directory /home/otchet/html/otchet>
        	Options +Includes -ExecCGI
       	 	AllowOverride All
        	Require all granted
  </Directory>
</VirtualHost>

The /home/otchet/html/otchet folder contains an already functioning site. I copied the conf file from it, just changed otchet.ru to otchet.org everywhere.
In my hosts I redirected the otchet.org domain there . I rebooted the
server.
But when I try to go to otchet.org :
Forbidden
You don't have permission to access / on this server.
Am I missing something?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanes, 2020-03-10
@Sanes

Create an index file and check the permissions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question