Link to home
Start Free TrialLog in
Avatar of Panos
PanosFlag for Germany

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.cfm
it is working.

Any help?
ASKER CERTIFIED SOLUTION
Avatar of Uvg
Uvg

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Panos

ASKER

Hi.
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?
Avatar of Uvg
Uvg

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.
Avatar of Panos

ASKER

Ok thank you. I will reply after testing.
Avatar of Panos

ASKER

Ok it is working. I had to clear the browser cache too. Thank you
Avatar of Panos

ASKER

Thank you
regards
panos
You succeed - I'm glad :)