Panos
asked on
Apache httpd & htaccess problem
Hello experts
I'm testing local my site but i have a problem.
I'm working with OS windows xp pro, apache 2,mysql, coldfusion.
settings:
1. hosts file:
127.0.0.1 mysite.selfip.com
2. httpd virtualhost:
<VirtualHost *:80>
ServerAdmin mysite.selfip.com
# Root folder for my scratchpad stuff
DocumentRoot "C:/Inetpub/wwwroot/mysite "
ServerName mysite.selfip.com
# Alias for /CFIDE, which the CF install placed in my Apache webroot.
# This is solely for our dev environment, and would not be a good practice
# within a production environment
Alias /CFIDE "C:/Apache2/htdocs/CFIDE"
<Directory "C:/Apache2/htdocs/CFIDE">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/mysite.loc-error.log
CustomLog logs/mysite.loc-access.log common
</VirtualHost>
Now if i type:
mysite.selfip.com in the address bar it redirects to www.mysite.selfip.com and i get a not found error .
If i type:
mysite.selfip.com/index.cf m
it is working.
Any help?
I'm testing local my site but i have a problem.
I'm working with OS windows xp pro, apache 2,mysql, coldfusion.
settings:
1. hosts file:
127.0.0.1 mysite.selfip.com
2. httpd virtualhost:
<VirtualHost *:80>
ServerAdmin mysite.selfip.com
# Root folder for my scratchpad stuff
DocumentRoot "C:/Inetpub/wwwroot/mysite
ServerName mysite.selfip.com
# Alias for /CFIDE, which the CF install placed in my Apache webroot.
# This is solely for our dev environment, and would not be a good practice
# within a production environment
Alias /CFIDE "C:/Apache2/htdocs/CFIDE"
<Directory "C:/Apache2/htdocs/CFIDE">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/mysite.loc-error.log
CustomLog logs/mysite.loc-access.log
</VirtualHost>
Now if i type:
mysite.selfip.com in the address bar it redirects to www.mysite.selfip.com and i get a not found error .
If i type:
mysite.selfip.com/index.cf
it is working.
Any help?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
As far as I know DirectoryIndex may be putted in .htaccess, but ServerAlias must be in httpd.conf file(or included in it).
Correct DirectoryIndex may be enough for you.
Correct DirectoryIndex may be enough for you.
ASKER
Ok thank you. I will reply after testing.
ASKER
Ok it is working. I had to clear the browser cache too. Thank you
ASKER
Thank you
regards
panos
regards
panos
You succeed - I'm glad :)
ASKER
i can't test it now because i'm not on my working pc but is it possible to add/change my htaccess instead of the virtualhost in the httpd file?