File "/home/v/s/vsdev/web/public_html/index.php" is not in document root of Vhost "/domains/d/e/dev.vacancysoft.com/web/public_html/"

File "/home/v/s/vsdev/web/public_html/index.php" is not in document root of Vhost "/domains/d/e/dev.vacancysoft.com/web/public_html/"

I've got a dev site running under http://dev.vacancysoft.com/

As you go there you can see the error and I really searched the web for the solution but couldn't find any.

It all started with the UID and GUID in suphp.conf. When I changed the values both to 0 (because the error was previous that the values are to high) the new one appeared and I don't know how to go through.

Any suggestions? (I am a begginer so please describe everything which is more advanced).

Cheers!

Update

The main site is down too, now the problem is really urgent.

答案1

Check the virtual server config. http://dev.vacancysoft.com/ should have:

DocumentRoot /domains/d/e/dev.vacancysoft.com/web/public_html/

I see that you're on Ubuntu. The conf file should be in /etc/apache2/sites-available/ and probably called dev.vacancysoft.com.conf

EDIT -- EDIT again -- sorry I'm a bit confused about your setup. Can you confirm that the files for the main site (vacancysoft.com) are in /domains/v/a/vacancysoft.com/web/public_html If so, then the instructions below should be correct:

You need to set up 2 virtual hosts, 1 for each of the two servers:

Edit /etc/apache2/apache2.conf and make sure it has the following 2 lines:

Include /etc/apache2/ports.conf

Include /etc/apache2/sites-enabled/

Edit /etc/apache2/ports.conf and make sure it has the following lines:

NameVirtualHost *:80
Listen 80

Create /etc/apache2/sites-available/vacancysoft.com.conf:

<VirtualHost *:80>
    ServerName vacancysoft.com
    ServerAlias www.vacancysoft.com

    DocumentRoot /domains/v/a/vacancysoft.com/web/public_html
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /domains/v/a/vacancysoft.com/web/public_html>
            DirectoryIndex index.php index.html index.htm
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>

    ErrorLog /var/log/apache2/vacancysoft.com-error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/vacancysoft.com-access.log combined
    ServerSignature Off

</VirtualHost>

cp /etc/apache2/sites-available/{,dev.}vacancysoft.com.conf

Edit /etc/apache2/sites-available/dev.vacancysoft.com.conf and:

  1. remove the ServerAlias line
  2. change all remaining instances of vacancysoft.com to dev.vacancysoft.com
  3. Change both insances of /domains/v/a/vacancysoft.com/web/public_html to /domains/d/e/dev.vacancysoft.com/web/public_html

sudo a2ensite vacancysoft.com.conf

sudo a2ensite dev.vacancysoft.com.conf

sudo apache2ctl restart

相关内容