Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

apachectl start vs service httpd start

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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

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…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
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…

809 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