-2

i've an apache 2 that im configuring for multiple virtual hosts... I was having lot of hassle so I turn off all the virtual hosts in order to make it works with one first and than later add others

BUT STILL NOT WORKING, seems there is an hidden conf file i don't know

under directory cd /etc/apache2/sites-enabled/ i have: webmin.1502165411.conf

under directory cd /etc/apache2/sites-available/ i have: webmin.1502165411.conf

So teoricaly there is just one virtualhost to be configured

this is the file configuration

<IfModule mod_fastcgi.c>

    AddHandler php7-fcgi-bolds .php
    Action php7-fcgi-bolds /php7-fcgi-bolds
    Alias /php7-fcgi-bolds /usr/lib/cgi-bin/php7-fcgi-bolds
    FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi-bolds -socket /run/php/php7.0-fpm.bolds.sock -pass-header Authorization

    <Directory "/usr/lib/cgi-bin">
    Require all granted
    </Directory>
    </IfModule>




<VirtualHost bolds.cloudns.club:80>
DocumentRoot /home/bolds/public_html
ServerName bolds.cloudns.club
<Directory /home/bolds/public_html>
Options None
Require all granted
</Directory>

<IfModule mod_fastcgi.c>
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
        SetHandler php7-fcgi-bolds
    </FilesMatch>
</IfModule>

</VirtualHost>

under the folder there is just the file samplefile

i made it just to test the index creation...

but whem i access the website [from other computer with other ip] i get an php_info response...

then if i run

apachectl -S
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
187.59.119.104:80      bolds.cloudns.club (/etc/apache2/sites-enabled/webmin.1502165411.conf:16)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33

which config file is setting DocumentRoot as /var/www/html???

  • probably httpd.conf. Or look through all files: find /etc/apache2 -type f -exec grep -H DocumentRoot {} \; – Jenny D Aug 20 '17 at 9:26
2

In my CentOS DocumentRoot configured in httpd.conf, depends on your OS, it could be apache.conf.

[root@centos-linux nginx]# cat /etc/httpd/conf/httpd.conf | grep DocumentRoot
# DocumentRoot: The directory out of which you will serve your
DocumentRoot "/var/www/html"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.