Posts

Showing posts with the label ----Avinash

Create a ftp user in windows

1. To get the details of the user in the server and also to add users you can use the command 'lusrmgr.msc' start>> run>> lusrmgr.msc While running this command you will get the list of users in the server. In order to create a new user, right click on 'users' >> 'New user' and to change the properties of the existing user, right click on the required user and select the 'Properties'. 2. Access IIS. This can be done using the command 'inetmgr' start>> run>> inetmgr In IIS select the corresponding domain inside the 'FTP sites' option and create a sub-directory with the name of the ftp user inside that domain. The document root of the domain is set on domain basis and all the users that come under that domain have their document root same. The document root can be set by 'right click on the domain'>> 'Properties' >>'home directory'...

Error: No listening sockets available

Sometimes while restarting/starting apache process, we get the following error: Error:(98)Address already in use: make_sock: could not bind to address [::]:80(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80no listening sockets available, shutting downUnable to open logs Fix:- 1)Kill All nobody process. Use the following script for doing that. for i in `ps auwx | grep -i nobody | awk {'print $2'}`; do kill -9 $i; done or for i in `lsof -i :80 | grep http | awk {' print $2'}`; do kill -9 $i; done 2) Restart apache.

How to block an IP address(es) in Windows

If you ever feel that someone may be trying to break into your server or know an IP address that you want to block from accessing your server there is a built in firewall on all of our 2008 DDS servers. You can use this firewall to block either a range of IP addresses or a single address. 1. Log into your server via RDP. 2. Click on start > administrative tools > windows firewall with advanced security. 3. On the left side of the firewall window click on the inbound rules option. 4. On the right side of the screen click on New Rule. 5. Click on the custom radio button and then click next. 6. Make sure the All programs radio is selected then click next. 7. On the protocol and ports options leave everything at its defaults and click next. 8. On the scope screen you will see two boxes the top one is for local IP addresses and the bottom is for remote IP addresses. In this scenario we are trying to block an outside (remote) IP from accessing anything...

Tunning / Optimizing my.cnf file for MySQL in Linux

While optimizing our mysql server, we should know about the parameters and the value assign to it. I am explaining the parameters and the appropriate value that should assign to it. 1. query_cache_size: In a situation where the database has to repeatedly run the same queries on the same data set, returning the same results each time, MySQL can cache the result set, avoiding the overhead of running through the data over and over and is extremely helpful on busy servers. 2. key_buffer: The value of key_buffer_size is the size of the buffer used with indexes. The larger the buffer, the faster the SQL command will finish and a result will be returned. The rule-of-thumb is to set the key_buffer_size to at least a quarter, but no more than half, of the total amount of memory on the server. Ideally, it will be large enough to contain all the indexes (the total size of all .MYI files on the server). 3. sort_buffer: The sort_buffer is very useful for speeding up myisamchk...

Optimizing Apache in High-Traffic server in Linux

If you are reaching the limits of your server running Apache serving a lot of dynamic content, this article concentrates on important and poorly-documented ways of increasing capacity without additional hardware. Problems: ~~~~~~~~~ There are a few common things that can cause server load problems. One of the common problem is: too many processes (or runaway processes) using too much RAM Solutions: Improve Apache's RAM Usage ~~~~~~~~~ Directives: 1. Reduce wasted processes by tweaking KeepAlive KeepAliveTimeout is the amount of time a process sits around doing nothing but taking up space. Those seconds add up in a HUGE way. But using KeepAlive can increase speed for for you - disable KeepAlive and the serving of static files like images can be a lot slower. KeepAlive enable HTTP persistent connections to improve latency times and reduce server load significantly. I think it's best to have KeepAlive on, and KeepAliveTimeout very low (like 1-2 second...

Configure suPHP on cPanel

After installing suPHP and before changing the PHP handler from your default one to suPHP, there are a few configuration options that need to be checked. 1) Check if the suPHP module is correctly loaded in the Apache configuration file. # LoadModule suphp_module libexec/mod_suphp.so 2) Run the below scripts to double check the server settings: # /scripts/postsuexecinstall # /scripts/chownpublichtmls 3) Lets check the permissions now. If there are files with either 777 or 666 permission inside the document root, you are most likely to get Internal Server Errors. find /home/*/public_html/ -perm 777 -exec ls {} \; find /home/*/public_html/ -perm 777 -exec ls {} \; Set 755 and 644 respectively, for the files that gets listed in the above command. 4) Check the CGI scripts as well # /scripts/fixsuexeccgiscripts 5) Last but not the least, make sure that there are no php_flags in the domain’s .htaccess file. # grep -iRl php /home/*/public_html/.htaccess If you wa...

How To Install Apache 2 with SSL on Linux

I prefer to install Apache from source, as it gives me more flexibility on exactly what modules I want to enable or disable, and I can also upgrade or apply patch immediately after it is released by the Apache foundation. 1. Download Apache Download Apache from httpd.apache.org . The current stable release is 2.2.17. Once you get the direct URL to download the latest stable version of Apache, use wget as shown below to download it directly to you server. cd ~ wget http://www.eng.lsu.edu/mirrors/apache//httpd/httpd-2.2.17.tar.gz tar xvfz httpd-2.2.17.tar.gz 2. Install Apache with SSL/TLS View all available Apache installation and configuration options as shown below. cd httpd-2.2.17 ./configure --help To install an Apache module, you would typically say –enable-{module-name}. For example, to install SSL with Apache, it is –enable-ssl. To install ldap module, it is –enable-ldap. To uninstall any default module that comes with Apache, you would typically say –disable-{modul...

How to change mail interface IP address

*********Exim************* Step 1 : Shutdown the exim service. # service exim stop or /etc/init.d/exim stop Step 2 : Edit your exim configuration file. # vi /etc/exim.conf Step 3: go to "remote_smtp" section under "TRANSPORTS CONFIGURATION". By default it would look like below: Quote: remote_smtp: driver = smtp interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{}}}{}} helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_ho stname}} Step 4 : Remove or comment line containing "interface" and "helo_data" and add new "interface" to match with that of your new IP address. It should look like as follows: Quote: remote_smtp: driver = smtp interface = 12.12.12.12 # Your IP address. Step 5 : Save your changes and exit out from your exim configuration file. Note : Dont forget to set read...