Solved

apachectl start vs service httpd start

Posted on 2006-07-18
3
3,330 Views
Last Modified: 2008-02-01
What is the difference between these two commands? If I start apache using apachectl start, I have no problems connecting to a MSSQL server from a PHP page, whereas if I use service httpd start only a blank page appears when loading the page. If I have to use apachectl start, will I still be able to configure httpd to secure the service? I haven't configured anything yet, still doing a lot of reading. The only thing that I have done is flush the iptables (#iptables -F) and doing so allows me to connect to the server from other computers on the network.  I've been reading about htaccess files. Are these placed in the folder that I want the user to access (/usr/www/html) and place a "deny from all" "Allow from none" statement? I'll award the maximum points since I'm asking several questions. Thanks!
0
Comment
Question by:horalia
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
periwinkle earned 500 total points
Comment Utility

1. apachectl is a shell script usually located in /etc/sbin/apachectl while the service script executes a server startup script, generally located in /etc/rc.d/init.d .  The startup scripts often differ from server to server -- you'd have to read and compare /etc/rc.d/init.d/httpd to /etc/sbin/apachectl to find the differences.  If apachectl is working properly for you, you may be able to rewrite parts of your startup script to use similar code, or even just call apachectl instead.

2. .htacess files are used to override commands that are located in your httpd.conf file.  Most commonly, they are used to indicate password protection of a directory.  If you have deny from all and allow from none in your configuration, NO ONE will be able to to read your directory from the web server.  See: http://httpd.apache.org/docs/1.3/howto/auth.html#allowdeny .  
0
 

Author Comment

by:horalia
Comment Utility
Thanks for the info! I'll read the scripts that you mentioned.

I also read that by default, httpd will deny from none and allow all, is this correct?
0
 
LVL 15

Expert Comment

by:periwinkle
Comment Utility
I believe that the default and ordering of allow and deny and their settings will depend upon your httpd.conf file.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now