473,398 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

DocumentRoot syntax error in a VirtualHost config on Apache

35
hi,

I am very new to PHP and trying to set up a virtual host in Apache so I can test the protx Form PHP Intergration kit

I received this message after I restarted Apache:
Expand|Select|Wrap|Line Numbers
  1. Syntax error on line 466 of c:/server/conf/httpd.conf: invalid command 'DocumentRoot/www/server/htdocs/VSPForm-kit' perhaps mispelled or defined by a module not included in the server configuration
  2.  
I installed the latest version of Apache on windows xp as well as PHP
I put VSPForm-kit in c:/server/htdocs and the spelling is correct.
How would you define a module not included in the server configuration

Expand|Select|Wrap|Line Numbers
  1. # Virtual hosts
  2. #Include conf/extra/httpd-vhosts.conf
  3. <VirtualHost 127.0.0.1>
  4. ServerName localhost:80
  5. DocumentRoot/www/server/htdocs/VSPForm-Kit   Line 466
  6. </VirtualHost>
  7.  
I typed http://localhost/VSPForm-kit but the welcome.php page did not show
I added welcome.php under
Expand|Select|Wrap|Line Numbers
  1. <IfModule dir_module>
  2.     DirectoryIndex index.html index.php default.html welcome.php
  3. </IfModule>
Any help appreciated
Nov 21 '07 #1
9 5188
andho
34
Syntax error on line 466 of c:/server/conf/httpd.conf: invalid command 'DocumentRoot/www/server/htdocs/VSPForm-kit' perhaps mispelled or defined by a module not included in the server configuration
its as the error says: invalid command

there should be a space after "DocumentRoot" and i dont think that "Line 466" belongs there either
Nov 21 '07 #2
camphor
35
Had a look at the Apache website and DocumentRoot has no space and I know line 466 is not suppose to be there, I just put it in just for reference. I am not sure how to fix this problem
Nov 21 '07 #3
Atli
5,058 Expert 4TB
Hi.

What I think andho means is that there should be a space after the DocumentRoot command.

For example:
Expand|Select|Wrap|Line Numbers
  1. // Your line is like this
  2. DocumentRoot/usr/local/apache/htdocs
  3.  
  4. // While it should be like this
  5. DocumentRoot /usr/local/apache/htdocs
  6.  
Check out this page for an example of the <VirtualHost> directive.

P.S.
I've change the title of this thread to better describe it's contents.

Please use good, descriptive, titles for you threads. It helps our other members finding questions they can help with, as well as making it easier for people looking for answers to a similar question.
Check out the Posting Guidelines for more on how to create good thread titles.

Thank you.
Nov 21 '07 #4
camphor
35
I put a space as per your suggestion DocumentRoot /www/server/htdocs/VSPForm-kit, there was no error when I started Apache but when I typed http://localhost/VSPForm-kit in my browser, this message came up "Forbidden You don't have permission to access /VSPForm-kit on this server." Even when I typed in http://localhost it also came up with ghe same error message. Why?
Nov 22 '07 #5
Atli
5,058 Expert 4TB
I would bet that has something to do with the directory permission.

Try doing something like:
Expand|Select|Wrap|Line Numbers
  1. chmod -R 755 /www/server/htdocs/VSPForm-kit
  2.  
Note, this will change the permission for all files and folders in all subdirectories of the given directory!
Nov 22 '07 #6
camphor
35
I would bet that has something to do with the directory permission.

Try doing something like:
Expand|Select|Wrap|Line Numbers
  1. chmod -R 755 /www/server/htdocs/VSPForm-kit
  2.  
Note, this will change the permission for all files and folders in all subdirectories of the given directory!
I am not sure where to put chmod -R 755 /www/server/htdocs/VSPForm-kit
within <VirtualHost>
Expand|Select|Wrap|Line Numbers
  1. <VirtualHost 127.0.0.1>
  2. ServerName VSPForm-Kit
  3. DocumentRoot /www/htdocs/VSPForm-Kit
  4. <Directory c:/server/htdocs/VSPForm-kit>
  5. Options Indexes FollowSymLinks Includes ExecCGI
  6. AllowOverride FileInfo
  7. Order allow,deny
  8. Allow from all
  9. </Directory>
  10. </VirtualHost>
Nov 23 '07 #7
Atli
5,058 Expert 4TB
I am not sure where to put chmod -R 755 /www/server/htdocs/VSPForm-kit
within <VirtualHost>
It shouldn't be.

The chmod command is a Linux command which should be executed on the server through the CLI.

If you don't have access to the server itself, you can probably execute the chmod command through FTP, although the -R property might not work through FTP.

Most FTP clients offer some sort of interface to change file permissions so you may want to check that out if you use such a client.
Nov 23 '07 #8
camphor
35
I would bet that has something to do with the directory permission.

Try doing something like:
Expand|Select|Wrap|Line Numbers
  1. chmod -R 755 /www/server/htdocs/VSPForm-kit
  2.  
Note, this will change the permission for all files and folders in all subdirectories of the given directory!
is there a way of changing the directory permission within Windows as I am using apache on windows
Nov 24 '07 #9
Atli
5,058 Expert 4TB
is there a way of changing the directory permission within Windows as I am using apache on windows
Yea sure thats possible.

First of all, you need to disable simple file sharing, so that you can mess with the permissions.

To do that, open a folder, select "Tools->Folder Options" from the main menu. Click the "View" tab and un-check the bottom checkbox in the list, titled "Use simple file sharing". Click OK to exit the window.

Then you need to set the permission, so that everybody has access to the folder.

Right click the folder you want to change the permission for. Click Properties. In the window that opens, select the "Security" tab.

If the user "Everyone" is in the list of users, make sure that he has "Read & Exectue", "List Folder Contents" and "Read" permissions.

If not, click the "Add" button, then the "Advanced" button and "Find now".
Select the user "Everyone" from the list and click OK on both of the open windows. Now make sure the permissions I listed earlier are set and click OK to exit the properties window.

Now it should be all set!
Nov 24 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Frank de Bot | last post by:
Hi, occasionaly I find in my apache logs that fastcgi had a broken pipe error with php running as fastcgi. the logs are like this: -- > (32)Broken pipe: > FastCGI: comm with server...
0
by: Julien Cigar | last post by:
Hello, I'm using mod_python 3.1.3 with Apache 2.0.54 on a Debian box with the publisher handler and the Clearsilver template engine, and from time to time apache returns an 500 error code...
0
by: quitaxe | last post by:
hi i have tomcat 3.3,jdk1.4 setup and running perfectly on my win 98 pc.i have tried to install apache cocoon on this but have failed.i'm getting the following error when i startup tomcat(after it...
8
by: lawrence k | last post by:
I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying to install PHP 5.1.4. I can not get the ./configure command to work. I keep getting this error: configure: error: Invalid...
3
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 with Apache 2. How would I get the value of the "ServerName" attribute of the "<VirtualHostdirective in the Apache configuration (httpd.conf) file? I noticed that...
1
by: ajos | last post by:
hi evrybdy, the problem is:- i had this running before in jsp but when i changed the jsp page using struts tags there occoured a problem... when i enter values in the 2 text boxes and click enter...
0
by: Adam Smith | last post by:
Apache 2.x on FreeBSD running multiple virtual domains with one IP # ScriptAlias defined in /usr/local/apache2/conf/httpd.conf is =ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/" which is...
8
lifeisgreat20009
by: lifeisgreat20009 | last post by:
What might be the possible cause ? I have created a website using struts framework, jsp In my transaction page the money is not getting transferred.. When I hit the submit button in my...
4
by: Donohujs | last post by:
Okay, I've recently installed apache to my laptop (Windows Vista). This is the first time I've tried anything like this and I don't have much knowledge with apache or computers overall, however I'm...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.