Вопрос

hi my virtual host entry looks like

 <VirtualHost *:80>
DocumentRoot C:\Program Files\Jenkins\jobs\Drupal_Test\workspace\app
<Directory "C:\Program Files\Jenkins\jobs\Drupal_Test\workspace\app">
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
    ServerName localmaster-jenkins


    ErrorLog "logs/dummy-host3.localhost-error.log"
    CustomLog "logs/dummy-host3.localhost-access.log" combined
</VirtualHost>

but when i try to restart apache its gives error like the follwing line "DocumentRoot C:\Program Files\Jenkins\jobs\Drupal_Test\workspace\app" cannot have two arguments by which i am assuming it means the directory name "Program Files" cannot contains spaces. i cannot rename directory . Is there any other work around

Это было полезно?

Решение

The directives that accept filenames as arguments must use Windows filenames instead of Unix ones. However, because Apache may interpret backslashes as an "escape character" sequence, you should consistently use forward slashes in path names, not backslashes. (Apache documentation: "Customizing Apache for Windows")

So try forward slashes:

DocumentRoot "C:/Program Files/Jenkins/jobs/Drupal_Test/workspace/app"
<Directory "C:/Program Files/Jenkins/jobs/Drupal_Test/workspace/app">
   # ....

Другие советы

Put quotes around your path, just as you did in the Directory directive.

DocumentRoot "C:\Program Files\Jenkins\jobs\Drupal_Test\workspace\app"
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top