If you're tring to get Apache to run under your user id (so that it can access files and directories owned by you), you should take a look at the suexec mechanism. If you're further looking to improve your security, maybe consider running apache in a chrooted/jailed environment. As for the datbase logs, you should never log username/password information (unless you're debugging), if you further want to secure your logs you could write to a named pipe and have another process (running as a different user) read from the pipe and log to a file not readable by your user.

Securing a website properly is a rather large topic and covers lots of areas (network security, host security, programming securely). There are lots of books on the subject though.


A computer is a state machine. Threads are for people who can't program state machines. -- Alan Cox

In reply to Re: Structuring a Web site and security issues by tirwhan
in thread Structuring a Web site and security issues by bradcathey

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.