Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm now setting up a weblog site and encountered this problem.

My server is Apache httpd 2.2. In case my weblog pollutes the root directory(htdocs), I created a subdirectory blog. The current state is that I can access the root directory from outside with http://my_ip_address/; it shows It works..

However, when I access the URL http://my_ip_address/blog, the server does not respond. I think there must be something wrong with the configuration. After searching Google, I find .htaccess may be the point, which is missing in the blog directory. Am I on the right track? By the way, what does .htaccess used to do?

Could you please give me a reference as a starting point?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

.htaccess is used for setting access to a site. its not what you need - you need to look at mod rewrite rules or vhosts and setting the vhost document root to /var/www/blog

the best starting point, naturally is apache's own docs, which i have linked to

share|improve this answer
    
Thanks for the link. :-) –  Summer_More_More_Tea Sep 9 '11 at 15:17
    
You use a lot of those rewrite directives in .htaccess files as well, if they only need to be directory specific, as your link shows. –  paradroid Sep 9 '11 at 15:19
add comment

.htaccess isn't usually required. It is used for configuration directives that might otherwise need to be put in the httpd.conf file, and is especially useful in cases where you don't have access to the server configuration.

At any rate, that probably isn't your problem. I suggest you review your httpd-error.log to see if the problem might be listed there.

share|improve this answer
    
Thanks for the advice. :-) –  Summer_More_More_Tea Sep 9 '11 at 14:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.