Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

apachectl start vs service httpd start

Posted on 2006-07-18
3
Medium Priority
?
4,138 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
[X]
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
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
periwinkle earned 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
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 …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month8 days, 15 hours left to enroll

604 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