Unix Hosting News & Commentary

PHP

  1. PHP is a server-side, cross platform, HTML embedded scripting language. Learn more of PHP from http://www.php.net

  2. You need php-mysql package to connect to a MySQL database. Download and install It is better to install a version of php-mysql that match with your native php and mysql that shipped together with your current Linux software.

  3. Update /etc/php.ini

    error_reporting = E_ALL & ~E_NOTICE
    display_errors = On
    register_globals = On
    memory_limit = 12M
    magic_quotes_gpc = Off

  4. To support GD, please install

    Install mbstring module, download and install. Restart Apache after installation.

  5. To support Zend Optimizer, please download from Zend Optimizer website and install. After successful installation, you will see the following line in the php.ini.

    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies with Zend Extension Manager v1.0.8, Copyright (c) 2003-2005, by Zend Technologies with Zend Optimizer v2.5.10, Copyright (c) 1998-2005, by Zend

    Restart Apache

Apache HTTP Server

The Apache HTTP Server Project (http://httpd.apache.org) is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.

Apache has been the most popular web server on the Internet since April of 1996. The October 2003 Netcraft Web Server Survey found that more than 64% of the web sites on the Internet are using Apache, thus making it more widely used than all other web servers combined.

  1. By default, Apache is not configured to start everytime the server reboot. To enable this, use chkconfig to configure the run level of this service.

    chkconfig –level 2 httpd on
    chkconfig –level 3 httpd on
    chkconfig –level 4 httpd on
    chkconfig –level 5 httpd on

  2. Start Apache, /etc/rc.d/init.d/httpd start

  3. SSL support is enabled by default. You can access the website with https:// or

    Modify Apache configuration file Config file for SSL, PHP, Perl, Webalizer and default Apache welcome page can be found in

  4. Turn off default Apache welcome page by comment out all directives in

  5. Increase the value of LimitRequestBody to 9999999 (10MB) in /etc/httpd/conf.d/php.conf
    LimitRequestBody 9999999

Sendmail

  1. The sendmail program is installed by default. Type rpm -q sendmail to view sendmail version number.

  2. By default, the date for /etc/mail/*.db is not correct and therefore you need to re-make the *.db file before you can start sendmail properly.

    makemap hash /etc/mail/access < /etc/mail/access

    makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable

    makemap hash /etc/mail/domaintable < /etc/mail/domaintable

    makemap hash /etc/mail/mailertable <

    sendmail.mc is a macro config file used to generate the sendmail.cf. You will have to regenerate the sendmail.cf by running this macro config through the m4 preprocessor. By default, sendmail does not accept email over the network except localhost. Comment out the line in sendmail.mc

    Name=MTA’)

    to

    dnl

    Create the /etc/sendmail.cf file from /etc/mail/sendmail.mc after the modification. Make sure that is installed before you can run the M4 preprocessor.

    m4 /etc/mail/sendmail.mc >

    Restart sendmail.

Mail Aliases

  1. Mail alias is a powerful features that enable mail to be directed to mailboxes that are alternate names for users or processes on a destination host. For example, it is common practice to have feedback or comments relating to a World Wide Web server to be directed to webmaster. Often there isn’t a user known as webmaster on the target machine, instead it is an alias of another system user. Another common use of mail aliases is exploited by mailing list server programs in which an alias directs incoming messages to the list server program for handling.

    The /etc/aliases file is where the aliases are stored. The sendmail program consults this file when determining how to handle an incoming mail message. If it finds an entry in this file matching the target user in the mail message, it redirects the message to wherever the entry describes.

    Specifically there are three things that aliases allow to happen:

    1. They provide a shorthand or well-known name for mail to be addressed to in order to go to one or more persons.

    2. They can invoke a program with the mail message as the input to the program.

    3. They can send mail to a file.

  2. Demonstrate the common types of aliases

    usenet: daph # alias for a person
    admin: daph,lee, # alias for several people
    news: :include:/home/news # read recipients from file
    changefeed: |/usr/local/lib/gup # to invokes program
    complaints: /var/log/complaints # alias writes mail to file

  3. After modify the /etc/aliases, update the aliases file with:

    Accepting Mail from Other Domains

    1. If we wish to configure virtual email hosting, the first thing we need to do is to convince sendmail that it should also accept mail for the domains that we are hosting.

    2. To stick with the default filename, if we wished to offer virtual hosting to the and domain2.com, we would create a that looks like:

      domain1.com.my
      When this is done, and assuming appropriate DNS records exist that point those domain names to our host, sendmail will accept mail messages for those domains as though they were destined for our real domain name.

    3. In your zone files of those new domain names, you should use real domain name’s MX mail server. Make a MX record like mail.domain1.com.my to domain1.com.my. Also, remember to make a A record for this mail.domain1.com.my to point to an IP address. Without this, sendmail (v8.9.x) will not deliver mail to the virtual domain.

    Forwarding Virtual-hosted Mail

    1. Add forwarding terms in

      Possible entries in virtusertable with virtual hosting of and domain2.com domains in style=”list-style-type : lower-alpha;”>

      User admin in virtual mail domain1.com.my to local user daph
      admin@domain1.com.my daph

    2. User daph in virtual domains domain1.com.my to another domains:
      daph@domain1.com.my style=”list-style-type : lower-alpha;”>

      Any mail to domain2.com are forwarded to daph@otherdomain.com
      @domain2.com style=”list-style-type : lower-alpha;”>

      Any mail to domain2.com are forwarded to the same user in another domains otherdomain.com
      @domain2.com

      Create the virtusertable database map with:

      makemap hash /etc/mail/virtusertable <

      In addition to the mail forwarding provided by aliases, sendmail allows individual users to define their own forwarding. The user defines her personal forwarding in the .forward file in her home directory. sendmail checks for this file after using the aliases file and before making final delivery to the user. If the .forward file exists, sendmail delivers the mail as directed by that file.

    Sendmail Configuration Script

    1. Alternatively, you can configure your sendmail with this sendmail-install.5.5 script.

    2. tar -zxvf

      ./install-sendmail –c

    3. Follow the onscreen step by step wizard to configure your sendmail aliases, virtual user table, outgoing mail server, incoming mail server, sendmail for local network, server queue time and others.



Categories

Site Directory

Top Web Hosts

1.  
StartLogic Review
2.  
PowWeb Review
3.  
Yahoo Review
4.  
Just Host
5.  
1&1 Hosting
6.  
Hostmonster Review
7.  
IX Web Review
8.  
Hostgator Review
9.  
iPowerWeb Review
10.  
Dot5 Review
-   
Go Daddy Review
-   
Network Solutions Review

Blogroll

Powered by Technorati