473,800 Members | 2,519 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DocumentRoot syntax error in a VirtualHost config on Apache

35 New Member
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 5221
andho
34 New Member
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 "DocumentRo ot" and i dont think that "Line 466" belongs there either
Nov 21 '07 #2
camphor
35 New Member
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 Recognized Expert Expert
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 New Member
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 Recognized Expert Expert
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 New Member
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 Recognized Expert Expert
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 New Member
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 Recognized Expert Expert
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
12169
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 /opt/guide/ppi.searchy.net/cgi-bin/php.fcgi" > aborted: write failed > FastCGI: incomplete
0
1607
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 (Internal Server Error). Apache errog.log file looks like : PythonHandler mod_python.publisher: Traceback (most recent call last): PythonHandler
0
1595
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 auto-deploys cocoon) and type the url: http://127.0.0.1:8080/cocoon into my ie5.5 Cocoon 2 - Internal server error
8
6308
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 Apache directory - unable to find httpd.h under /usr/local/apache/include So then I run this command: find / -name httpd.h
3
2485
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 "$_SERVER" is not the answer to this question because we have multiple domains pointing to the same IP, and "echo $_SERVER" always yields a value typed in the browser's address bar.
1
3373
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 an exception occours which is- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request.
0
1229
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 the default I wished to define a proprietary cgi-bin for a specific single domain which I defined within its virtual domain directive, but it did not work. Could someone say what I am doing wrong.
8
2684
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 Transaction.jsp page , no transaction happens .. Only the url changes from http://localhost:8080/bankfinalproject/jsp/transaction.jsp to this
4
3047
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 doing this to learn. When setting it up I followed the installation process and as I tried to change the documentroot through the httpd file it won't work. It says "Cannot create C:\Program Files\Apache Software Foundation\Apache...
0
9695
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9555
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10514
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9099
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6826
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5479
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5616
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4156
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2956
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.