Configure Your Stuff

Aug 1, 2007

This is a instructional overview thread for those developers who are getting into setting up their own server with a LAMP (Linux Apache MySQL PHP) setup. The linux distro referred to in this thread is a centOS (fedora|redhat) setup.

Before Anything

- Make sure that your actual RAM is the same amount that is displayed by the server (there could be some BIOS restrictions on RAM so check for that).

Linux OS Installation

- Use a server system for the type of install.
------------------------------
- Setup you partitions with care:
- Make sure that everything other than /swap is an ext3 partition type.
- /swap (usually double the amount of space that your ram has but never larger than 4 gigs.
- /tmp (700meg is ok).
- /boot (100meg is ok).
- / (leave rest of the available space in the harddrive for this).
------------------------------
- Use GRUB boot loader
- Use DCHP only if your IP address changes due to the network. If not, then assign the IP address of the box.
- Assign the netmask if DCHP is not in use.
------------------------------
- When setting up the packages, select only what you need. Most of the time it's better to just install no packages and then install everything you need by yum (yellowdog update manager). If you do not select any packages, only the 1st CD of the linux install will be needed.

Linux OS Customizing

- Create a new user and provide it a password (with # passwd). Do not create a user with a generic or commonly known names used in any daemon programs (ex. mysql, apache, admin, user, php, postgresql).
- Disable the ROOT login in SSH (this means that when you login using the other user with SSH, you'll have to $ su to the root user).
- Install "Development Tools" with yum using group install if you plan to compile your own apache. If not then install apache with yum install apache.

Apache Settings

- Disable the extensions that you're not using for your website. If the server is only hosting one website, then there is no use for Virtual Hosts.
- Set the ServerLimit value to a suitable value so that users won't get locked out of the website.
- Change the User and Group directives to the newly created user.
- Set Options +Indexes to Options -Indexes so that the contents of directories w/o an index file will not be displayed.
- Change the DocumentRoot setting to the newly created user's home (~) directory. Or if you plan to use the default (/var/www/htdocs or /var/www/html) then assign the permissions of the user to that directory.
- Add apache as a start up program when the operating system boots up (this can be set in /etc/rc.d/local).
- Setup logs accordingly. If you setup image logging and your server has 20+ images per page then your website performance can suffer.
- Setup Error Logs to a suitable level.
- If any web pages are not displaying and the web server appears to be on when accessing it from the localhost (wget http://localhost) then disable or flush the iptables (/usr/sbin/iptables --fliush). You should also set this as a start up option for the OS.
- Use mod_rewrite to use modern URLs.

MySQL Settings

- Use --skip-name-resolve.
- Use --skip-bdb (if you're not using it).
- Use --skip-innodb (if you're not using it).
- Set a log for slow queries.
- Set the max_connections to a high value.
- Do not set a user with a wildcard ip-address. Only setup users with a specific ip.
- Use Query Caching for frequently used queries.

PHP Settings

- Disable Magic Quotes.
- Disable Register Globals.
- Disable Short Tags.
- Disable ERROR REPORTING if the website is not in development mode.
- Enable HTTP Only Session Cookies.
- Set Session Cookies to only be cookies (and not URL's).
- If sessions do not work, then set the session save path to a directory where the apache user has access to.
- Use Gzip Compression.

Optimizing Concepts

- Use an optcode cache for PHP (Eaccelerator).
- Consider using a static domain for CSS and JS files (this way the same cookies for the website won't be sent on each request).
- If your website uses alot of CSS and JS files per page, bundle all of them together into one request using mod_rewrite and php [url]
- For Apache, use the lingerD module (this reduces the amount of resources that are used when an apache connection is closed).

Here are some links for optimizing your server build:

- [url]
- [url]
- [url]

View 1 Replies


ADVERTISEMENT

Colo Stuff Supplier

Nov 5, 2009

I am looking for a new supplier for colocation related stuff like shelfs, powercables, tyraps, etc etc. A shop which has most of the items which come in handy when you are in a datcenter.

Location does not really matter if they can ship :-)

Let me know where you get your stuff.

View 8 Replies View Related

Strange Stuff In /var/log/messages

Feb 19, 2007

Quote:

Feb 19 15:57:39 server proftpd[1363]: server.com (127.0.0.1[127.0.0.1]) - FTP session closed.
Feb 19 16:06:02 server proftpd[1982]: server.com (127.0.0.1[127.0.0.1]) - FTP session opened.
Feb 19 16:06:02 server proftpd[1982]: server.com (127.0.0.1[127.0.0.1]) - FTP session closed.
Feb 19 16:14:24 server proftpd[2471]: server.com (127.0.0.1[127.0.0.1]) - FTP session opened.
Feb 19 16:14:24 server proftpd[2471]: server.com (127.0.0.1[127.0.0.1]) - FTP session closed.
Feb 19 16:22:46 server proftpd[3062]: server.com (127.0.0.1[127.0.0.1]) - FTP session opened.
Feb 19 16:22:46 server proftpd[3062]: server.com (127.0.0.1[127.0.0.1]) - FTP session closed.
Feb 19 16:31:09 server proftpd[3696]: server.com (127.0.0.1[127.0.0.1]) - FTP session opened.
Feb 19 16:31:09 server proftpd[3696]: server.com (127.0.0.1[127.0.0.1]) - FTP session closed.
Feb 19 16:39:31 server proftpd[4185]: server.com (127.0.0.1[127.0.0.1]) - FTP session opened.
Feb 19 16:39:31 server proftpd[4185]: server.com (127.0.0.1[127.0.0.1]) - FTP session closed.
Feb 19 16:47:53 server proftpd[4946]: server.com (127.0.0.1[127.0.0.1]) - FTP session opened.
Feb 19 16:47:53 server proftpd[4946]: server.com (127.0.0.1[127.0.0.1]) - FTP session closed.
Feb 19 16:56:16 server proftpd[5495]: server.com (127.0.0.1[127.0.0.1]) - FTP session opened.
Feb 19 16:56:16 server proftpd[5495]: server.com (127.0.0.1[127.0.0.1]) - FTP session closed.
Feb 19 17:04:38 server proftpd[6206]: server.com (127.0.0.1[127.0.0.1]) - FTP session opened.
Feb 19 17:04:38 server proftpd[6206]: server.com (127.0.0.1[127.0.0.1]) - FTP session closed.
Feb 19 17:13:00 server proftpd[6661]: server.com (127.0.0.1[127.0.0.1]) - FTP session opened.
Feb 19 17:13:00 server proftpd[6661]: server.com (127.0.0.1[127.0.0.1]) - FTP session closed.
Feb 19 17:21:23 server proftpd[7225]: server.com (127.0.0.1[127.0.0.1]) - FTP session opened.
Feb 19 17:21:23 server proftpd[7225]: server.com (127.0.0.1[127.0.0.1]) - FTP session closed.

I see over a few hundred of these lines in /var/log/messages. The timestamp is exactly the same for every 2 lines (Proftp session- Opened and Closed). It's occuring every hour of the day. Is someone attacking the ftp daemon or something?

View 3 Replies View Related

VPS Config. To Much Stuff Running On It

Jul 1, 2007

I am about to order a new VPS, and will like to have php,mysql,ruby on it. the extra thing would be tomcat 5.

First of all, I don't think that any of the clients is going to use tomcat, but it would look nice to have it there.

the VPS is something like:
Cent OS
512 Mb ram with 1,5 Gb burst
30 Gb space

Should I get tomcat installed or not?

View 2 Replies View Related

A List & Anti-phishing Stuff

Dec 17, 2007

I don't know about security on servers much, and we're setting up our new server. I have the techs doing the install stuff, but I would love to know what to install security wise. My current list:

Firewall - good free one?
Antivirus - good free one?

rootkit, some way of stopping it (anti-rootkit?)

Also, is there some sort of script which searches all cPanel accounts/files for phishing sites or spam sites etc? I swear I've seen one before, in firewall form?

Oh the server setup is going to be:

php5-CGI, fCGI, mySQL 5, apache 2.2.x, centOS, ruby on rails, django, ioncube, other php libraries, mod_rewrite, I think thats everything. (cPanel).

View 4 Replies View Related

Security To Stop DDoS Attacks And Stuff

May 19, 2009

My host tells me that they have security to stop DDoS attacks and stuff, however today my server load jumped to 17.12 and my site went down giving me a "Network Timeout" error.

My host tells me it's my fault that I am using too many resources. The MOST my site has been on load is 3.06 and that was around lunch time a few weeks back. It's 11:43 and the server load is 17.12? I think my host is pulling my leg. I have not added ANYTHING new to my site and have not changed anything in 3 days. The load has been fine till today.

I use In Motion Hosting.

View 14 Replies View Related

Console Cable Pin Out For Extreme Networks Stuff

Jun 16, 2008

if anybody know the cable pin out on making a console cable using those serial adapters?

View 1 Replies View Related

"antinat" (proxy Stuff)

Feb 24, 2008

antinat.sourceforge.net -- this is suppose to be good for setting up socks5 proxies.

I need to set it up so that each IP needs a user/pass login..

View 5 Replies View Related

Configure The Same DNS

Mar 27, 2008

some of my sites works good and some didn't work!

i check my site on checkdns.com and its show me this Error Report

CheckDNS.NET is verifying if NS are alive[url] NS list mismatch: registration authority reports that domain is hosted on the following servers: 'ns.sitename.com; ns1.sitename.com', but DNS server ns.sitename.com reports domain to be hosted on 'ns.sitename.com'. Please make sure that you configure the same DNS servers in registrar database and on your DNS

i saw the

PHP Code:

 [root@secure ]#  cat /etc/resolv.confnameserver xxx.xxx.xx.xxxnameserver xxx.xxx.xx.xxxnameserver xxx.xxx.xx.xxx[root@secure ]# 

i have 2 ip just

View 2 Replies View Related

Configure Two Nameservers?

Feb 16, 2008

I have a question on how to set up (clone) two nameservers.

I have two VPS' with two IPs that are totaly independent of each other. Both running ispCP with Apache2, mail, ftp, mysql, AND bind9 as DNS managment.

So. I want these two server to be as independent as they are, BUT they should share NameServers with each other.

Something like this:

host1:
ns1.domain.com = host1
ns2.domain.com = host2

host2:
ns1.domain.com = host1 (or host2?? = inverted)
ns2.domain.com = host2 (or host1?? = inverted)

A lot of domains are running more then one NameServer, but I could not find any tutorial on how to "clone" the NS from one to an other. Is it enough to just add some kind of "transfer to IP setting" in bind, or do I have to have scripts that download settings and files from one server to an other regularly?

View 2 Replies View Related

Configure Suexec And PHP

Mar 15, 2008

I have a problem in the last apache upgrade (apache 2.2.8 + php5) step .
exactly in "Configure Suexec and PHP"

I found this option doesn't have multi values as CGI or Suphp just I found none :

PHP 5 Handler none

PHP 4 Handler none

I must to return to build apache1 with php4 for I can see suphp and cgi in "Configure Suexec and PHP" "PHP 4 Handler" option .

View 5 Replies View Related

Best Way To Configure MySQL

Jun 17, 2008

On my server I'd like to keep sites as fast as possible and not drain too much on the server. I don't have many users, but I'd like to get it right the first time. What's the best DB engine to use? What about other settings? I'm not sure I should run caching yet, I'm not under much load.

The server is running on Windows.

View 5 Replies View Related

Configure Openvpn

Jul 14, 2008

how come I can't route all traffic through openvpn.

1. I was able to ping my client and server ip no problem. So the tunnel connection is fine.

The problem is i can't route internet traffic through openvpn.

I was able to ping from tun0 interface after i add below command
iptables -t nat -A PREROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

root@host188 [/etc/openvpn/config]# ping -I tun0 4.2.2.2
PING 4.2.2.2 (4.2.2.2) from 10.8.0.1 tun0: 56(84) bytes of data.
64 bytes from 4.2.2.2: icmp_seq=1 ttl=55 time=8.94 ms
64 bytes from 4.2.2.2: icmp_seq=2 ttl=55 time=8.65 ms
64 bytes from 4.2.2.2: icmp_seq=3 ttl=55 time=8.90 ms

However, my client can't ping 4.2.2.2 from vpn tunnel and I use tcpdump I saw the traffic coming.

View 2 Replies View Related

Configure WAMP5?

Mar 3, 2007

downloaded WAMP5_1.7.0. Prior to downloading I was freaking out wondering if I was going to screw up my computer with software conflicts, but I pressed on. I read the Apache information regarding IIS / Apache conflicts. The tutiorial told me to check the services installed on my computer. The tutorial told me to look for a service titled "World Wide Publishing" The service (WWP) did not exist so I proceeded to the WAMP installation wizard. I installed it. Apache does not display in the services window. As if it does not exist. Apache will not fire up. From what I got from the instructions at Apache, it seems there are alot of modifications I can perform to setup Apache correctly. The long and short of it is I connot see my see what my HTML/PHP code is spitting out because Apache never fires up. Can anyone give me some pointers on setting WAMP up in plain ENGISH? Just a note, when I float my mouse over the Apache icon, a little mouse over windows comes up saying "one of two servers running". Is ISS enabled on my computer? I'm frustrated. Any help regarding this matter is worth a beer (or 12).

View 0 Replies View Related

Configure Web Hosting

Feb 7, 2007

I purshased a web hosting and I uploaded just one folder to it with my email contact form. The fact is that Google is already listing my site but it is showing the full content of my HTML public folder! Everyone could search my site like an FTP! I don't really want that. How can I avoid that? I just want web browsers to show my web pages, not the folders neither my HTML public folder with all my files: scripts, photos, etc.

Google is showing all this:

Index of /[DIR] Parent Directory 15-Jan-2007 07:58 - [DIR] cgi-bin/ 15-Jan-2007 02:37 -. Apache/1.3.37

Maybe the solution is too easy but for me it is a nightmare right now.

View 6 Replies View Related

Configure NIC On Windows

Oct 3, 2007

Between our Linux servers, I can get speed up to 80Mbps when transferring big files. However, between Linux and Windows, it's just around 800Kbps - 2Mbps. It shows in network connection properties that connected at 100Mbps, but not sure why it's so slow

Is there any setting I should pay attention? Running Windows 2003 on that box.

View 7 Replies View Related

How Do We Configure RAID1

Aug 7, 2007

I would like to configure RAID 1 setup. Do I need extra hardware or if I have 2 hard drives can I set it up?

View 3 Replies View Related

How To Configure Sub-domain In IIS 6

Feb 22, 2007

I am running IIS 6 for testing & developing web sites offline before uploading the.But i am having little problem reagarding name server and how to configure sub-domain in name server,

View 2 Replies View Related

DNS - How Do I Configure In This Situation

Feb 9, 2007

I have 2 servers, 1 has its DNS sorted out, and I have a domain on it. The other is an unmanned dedicated server. I need to configure plesk, and I understand it needs a valid DNS to function.

What I want from the second server is simply for its pages, content etc to be accessed via the IP address, not a domain, as it is purely a media server. So how can I configure this? I created a virtual domain but the plesk server shows the default folder content and not the virtually created one, how can I get the server to point to my virtually created folder content?

View 5 Replies View Related

Configure Backup

Nov 27, 2007

when i set the Backup Destination to ( /home/cpbackup/daily/) this error appear to me

Quotas cannot be built! Your cpbackup destination is on a filesystem which has quotas enabled. Please move it to a filesystem which does not have quotas turned on or a separate partition/disk slice mounted at /backup.Backup has been disabled to prevent quota problems...

i have only one 500 GB HDD

PHP Code:

Filesystem            Size  Used Avail Use% Mounted on/dev/sda5             9.9G  386M  9.0G   5% //dev/sda1              99M   21M   73M  23% /bootnone                  2.0G     0  2.0G   0% /dev/shm/dev/sda7             426G  2.1G  403G   1% /home/dev/sda8            1012M  112M  849M  12% /tmp/dev/sda3             9.9G  2.5G  6.9G  27% /usr/dev/sda2             9.9G  716M  8.7G   8% /var/tmp                 1012M  112M  849M  12% /var/tmp 

View 7 Replies View Related

How To Configure Open_basedir

Sep 26, 2007

I want to include script wpisz.php from /srv/www/vhosts/default/htdocs into /srv/www/vhosts/domena.pl/httpdocs/, but i recive this error:

Code:
Warning: main() [function.main]: open_basedir restriction in effect. File(/srv/www/vhosts/domena.pl/httpdocs/wpisz.php) is not within the allowed path(s): (/srv/www/vhosts/default/htdocs:/tmp) in /srv/www/vhosts/default/htdocs/index.php on line 3

Warning: main(/srv/www/vhosts/domena.pl/httpdocs/wpisz.php) [function.main]: failed to open stream: Operation not permitted in /srv/www/vhosts/default/htdocs/index.php on line 3

Warning: main() [function.include]: Failed opening '/srv/www/vhosts/domena.pl/httpdocs/wpisz.php' for inclusion (include_path='.:/usr/share/php') in /srv/www/vhosts/default/htdocs/index.php on line 3

So, I ask you to help me to set it up (propably open_basedir) in that way in which will it work fine. But please.. use a simple language and describe the solution step-by-step because I'm not doing well whith this..

View 3 Replies View Related

Configure Mod_proxy

Jan 5, 2007

to configure mod_wodan but received no response. As I couldn't do it myself, I'm now trying to install mod_proxy. Bellow are the relevant sections of the httpd.conf file. The problem is that, though the web server starts correctly, I can't access the [url].
......................................................

LoadModule proxy_module libexec/mod_proxy.so
AddModule mod_proxy.c
......................................................

Port 80
#Listen 80
Listen 8000

<IfModule mod_proxy.c>
ProxyRequests Off
ProxyVia On
<Directory backup/proxycache:*>
Order deny,allow
Deny from all
Allow from example
</Directory>
CacheRoot "/backup/proxycache"
CacheSize 10000000
CacheGcInterval 8
CacheMaxExpire 168
CacheLastModifiedFactor 0.1
CacheDefaultExpire 72
CacheForceCompletion 10
NoCache example.net search.example.com
</IfModule>
......................................................

<VirtualHost *:80>
ServerName www.example.org
ServerAdmin name@example.org
User name
Group name
BytesLog domlogs/example.org-bytes_log
CustomLog /usr/local/apache/domlogs/example.org combined
ProxyPass / [url]
ProxyPassReverse / [url]
</VirtualHost>
<VirtualHost *:8000>
ServerName www.example.org:8000
ServerAlias othername.example.org
ServerAdmin name@example.org
User name
Group name
DocumentRoot /home/name/public_html
ScriptAlias /cgi-bin/ /home/name/public_html/cgi-bin/
BytesLog domlogs/example.org-bytes_log
CustomLog /usr/local/apache/domlogs/example.org combined
</VirtualHost>
<VirtualHost *:80>
ServerName example.org
User name
Group name
BytesLog domlogs/example.org-bytes_log
CustomLog /usr/local/apache/domlogs/example.org combined
Redirect 301 / [url]
</VirtualHost>
......................................................

View 0 Replies View Related

Fileinfo :: Configure Failed

Apr 24, 2009

root@host [~]# pecl install fileinfo
WARNING: "pear/Fileinfo" is deprecated in favor of "channel://php-src/ext/fileinfo/in php sources"
WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update
downloading Fileinfo-1.0.4.tgz ...
Starting to download Fileinfo-1.0.4.tgz (5,835 bytes)
.....done: 5,835 bytes
3 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
building in /var/tmp/pear-build-root/Fileinfo-1.0.4
running: /root/tmp/pear/cache/Fileinfo-1.0.4/configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
ERROR: `/root/tmp/pear/cache/Fileinfo-1.0.4/configure' failed

View 3 Replies View Related

MagickWand Configure Error

Apr 27, 2009

./configure is looking for the configuration program called MagickWand-config, but my configuration program in the /ext/magickwand directory was simply configure. I just did a cp configure MagickWand-config and then the ./configure proceeded without any problems.

View 1 Replies View Related

Configure Exim And Spamassassin

May 20, 2009

I need to configure Spamassassin to not check outgoing mails

So I need to check only mails that are hosts on my mail server, but mails which relay not to be checked.

configuration of Spamassassin in exim:

warn spam = nobody
warn message = X-Spam_score: $spam_score

X-Spam_score_int: $spam_score_int

X-Spam_bar: $spam_bar

X-Spam_report: $spam_report
condition = ${if eq {$acl_m1}{local_to_check_spam} {yes}{no}}
!condition = ${if eq {$acl_m0}{local_to_check} {yes}{no}}

Maybe it's need just one line in Spamassassing local.cf?

View 0 Replies View Related

Configure CentOS For Web Server

May 23, 2009

im using Vmware

i want install centOS ( vps ), Im try to install text mod , before start install centOS ( Blue Screen ) ask about install some package ! like,

Editors, Text Based Internet, Server Configuration Tools....

i want know for web server ! which package must checked ?

View 8 Replies View Related

Where Can I Find How To Configure Apache

May 31, 2009

Where can I find how to configure apache for web hosting correctly?

View 7 Replies View Related

How To Configure SMTP On Different Server

Dec 8, 2008

How to configure SMTP on different server?

I don't know why I typed SMTP in the title. I meant just the mail server.
I just posted a message saying that my VPS is down due to FDCServers being down as they supply my host.

I can live with a 24 hr blackout on my site (however definitely not happy about it).

What I can't live with is having my mail.mydomain.com server being down at all. I run my VPS and host a few sites from it including a few clients. I need to make sure that my email doesn't go down when my VPS goes down.

How can I go about this? If I purchase a second VPS plan can I have that run just my email server for me? If so, how much in resources do I need? Will a cheap plan do the trick (ie. 64mb Ram or something)?

View 6 Replies View Related

PHP Configure For Shared Hosting

Nov 11, 2008

What do you guys typically do for configuring php in a shared environment?
So far I'm doing:

./configure '--prefix=/usr/local/php5' '--with-litespeed' '--with-config-file-path=../php' '--with-mysqli' '--with-mysql=../mysql' '--with-libdir=lib64' '--with-zlib' '--with-gd' '--with-jpeg-dir=/usr/lib64' '--with-png-dir=/usr/lib64' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--with-freetype' '--with-freetype-dir=/usr/include/freetype2' '--with-ttf' '--with-imap-ssl' '--enable-soap' '--enable-dbase' '--enable-safe-mode' '--with-openssl'

View 4 Replies View Related

Configure Subdomain On Another Server

Apr 29, 2008

I have 2 domains as follows:

Domain1 on Server 1 = www.domain1.com
Domain2 on Server 2 = www.domain2.com (has a forum)

How can I configure subdomain.domain1.com, but to be on Server 2?

The idea of this exercise is to feel the visitors when they browse the forum that they are on same website/server.

View 7 Replies View Related

Want To Configure Shoutcast For The Server

Feb 28, 2008

my current dedi server and want to configure shoutcast for the server. I have install the shoutcast located in /usr/local/shoutcast.

Just curious one of my customer would like to use the shoutcast so how can i create a user for them? should i install manually for each of my customer that want to host shoutcast?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved