Solved

apachectl start vs service httpd start

Posted on 2006-07-18
3
3,412 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
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 …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

867 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

21 Experts available now in Live!

Get 1:1 Help Now