Home  >  Q&A  >  body text

The log of the IP address on the apache virtual host cannot take effect

The title is a bit difficult to understand. . .
The situation is as follows:
<VirtualHost *:8080>

<Directory /var/www/ip/html>
    Allow from all
</Directory>
ServerAdmin webmaster@domain.com
DocumentRoot /var/www/ip/html
ServerName 104.xxx.xxx.xxx
ErrorLog /var/www/ip/html/error/error_log.log
CustomLog /var/www/ip/html/log/access_log.log common

</VirtualHost>

Use virtual host to set server IP to access
If you remove the ErrorLog and CustomLog lines, httpd can restart, otherwise

will appear

[root@localhost ip]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: [FAILED]

There is no reason given and I don’t know how to solve it.

为情所困为情所困2713 days ago411

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-05-16 17:05:23

    First of all, I don’t know why your access.log and error.log are placed in the directory of the web application. Shouldn’t the logs be separated? Secondly, I think it is a problem with the permissions of these two files, including the permissions of its parent directory and the file itself

    reply
    0
  • Cancelreply