Solved

apachectl start vs service httpd start

Posted on 2006-07-18
3
3,490 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
ID: 17146967

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
ID: 17147057
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
ID: 17147067
I believe that the default and ordering of allow and deny and their settings will depend upon your httpd.conf file.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

785 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