ManyCodes.com – codes & scripts Get free programming codes and tutorials!

10Aug/090

How to Stop/Restart Lighttpd Web Server in Debian / Ubuntu / FreeBSD linux

/etc/init.d/lighttpd is a script under Linux to stop / restart lighttpd web server.

To stop lighttpd:

Use the following command to stop lighttpd:

# /etc/init.d/lighttpd stop

To restart lighttpd:

Just type the following command to restart lighttpd:

# /etc/init.d/lighttpd restart

To start lighttpd:

# /etc/init.d/lighttpd start

Debian / Ubuntu Linux Start lighttpd

# /etc/init.d/lighttpd start

Debian / Ubuntu Linux - Stop lighttpd

# /etc/init.d/lighttpd stop

Debian / Ubuntu Linux - Restart lighttpd

# /etc/init.d/lighttpd restart

FreeBSD Start lighttpd web server

# /usr/local/etc/rc.d/lighttpd start

FreeBSD - Stop lighttpd webserver

# /usr/local/etc/rc.d/lighttpd stop

FreeBSD - Restart lighttpd webserver

# /usr/local/etc/rc.d/lighttpd restart

In case if you don't have init script, type the following:

# killall lighttpd
10Aug/090

Ubuntu Linux Start / Restart / Stop Apache 2.2 Web Server

Q. How to restart or stop Apache 2.2 web server under Ubuntu Linux?

Task: Start Apache 2.2 Server

# /etc/init.d/apache2 start

or

$ sudo /etc/init.d/apache2 start

Task: Restart Apache 2.2 Server

# /etc/init.d/apache2 restart

or

$ sudo /etc/init.d/apache2 restart

Task: Stop Apache 2.2 Server

# /etc/init.d/apache2 stop

or

$ sudo /etc/init.d/apache2 stop
5Aug/093

Stop the Auto Play Pop Up When You Plug In Your iPhone or iPod Touch to a Windows XP Computer

Every single time I plug in my iPhone to my Windows XP computer I get a pop up window asking how I want to handle the images from the iPhone. The most annoying part of this is there is no way from that pop up to tell the computer that you don’t want to be asked every single time. The good news is that it is really easy to tell your computer you do not want to be asked every single time. Follow the instructions below to turn off the pop up every time you plug in your iPhone to your Windows XP computer.

iPhone Pop Up on Windows XP:

iPhone Camera Auto Play Pop Up

Windows XP: Disable Auto Play Pop Up for iPhone

  1. Plug In iPhone:First make sure your iPhone or iPod Touch is plugged into your computer and finished syncing with your iTunes.
  2. Open Control Panel:First open your control panl by clicking on the Start menu and selecting Control Panel from the pop up navigation. A view of the control panel is shown below.

    Windows XP Control Panel

  3. Open Scanners and Cameras: Now double click on the “Scanners and Cameras” link to open a list of the scanners and cameras currently connected to your computer.

    XP Control Panel: Scanners and Cameras

  4. iPhone Camera Properties: Right click on the iPhone in the list of Scanners and Cameras to display a menu as shown below.

    iPhone Camera Properties Menu

    Select Properties from the menu to open the iPhone camera properties configuration window as shown below.

    Windows XP: iPhone Camera Properties

  5. Modify iPhone Camera Events: Click on the Events tab in the iPhone camera properties configuration window as shown below.

    iPhone Camera Auto Play Event

    Select the “Take no action” radial and then click the Apply button to save. OK out of this configuration window and close the Control Panel.

  6. Verify No Pop Up: Now unplug your iPhone and plug it in again to trigger the synchronization process with iTunes. You should no longer receive a pop up from the Windows Auto Play feature.

Now you can plug your iPhone into your Windows XP computer without having to close out the Auto Play prompt every time.

29Jul/090

How to prevent or stop right click on your website

Here is how you can prevent right click on your website. This will stop people from looking at the source code of your website.

Put the code below within your site's source code. If you dont know how to implement this code into your site, please goto how to implement the code to your website

Code:

<!-- this script is from www.manycodes.com -->
<SCRIPT language=JavaScript>
document.onmousedown=click
var times=0
var times2=10
function click() {
if ((event.button==2) || (event.button==3)) {
if (times>=1) { bye() }
alert("No right clicking!!!!!! don't do it again..");
times++ } }
function bye() {
alert("I said NO right clicking! click ok to exit LMAO!");
bye() }
</SCRIPT><font face="Tahoma"><a target="_blank" href="http://www.manycodes.com/category/java/javascript-codes/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font>