find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
Question: How do I change Apache 2 default port under Debian / Ubuntu Linux? I’ve couple of public IPv4 address assigned by my ISP, how do I force Apache2 to listen to a specific IP address? How do I change Apache2 IP address binding?
Answer: You can easily change the port and other settings using following directives:
The Listen directive instructs Apache to listen to more than one IP address or port; by default it responds to requests on all IP interfaces, but only on the port given by the Port directive. You can use this directive multiple times.
Open /etc/apache2/ports.conf file, enter:
# vi /etc/apache2/ports.conf
OR
$ sudo vi /etc/apache2/ports.conf
To make the server accept connections on both port 8010, enter:
Listen 8010
To make the server accept connections on both port 80 and port 8010, use:
Listen 80
Listen 8010
You need to use network interfaces IP address. For example, to make the server accept connections on IP 202.54.1.2 and port 80, enter:
Listen 202.54.1.2:80
To make the server accept connections on two specified interfaces and port numbers, enter:
Listen 202.54.2.1:80
Listen 202.54.2.5:8010
Save and close the file. Restart Apache 2 webserver:
# /etc/init.d/apache2 restart
OR
$ sudo /etc/init.d/apache2 restart
Use netstat command to find out if Apache is listening on a specific port or not, use:
# netstat -tulpn
# netstat -tulpn | grep :80
# netstat -tulpn | grep :8010
# netstat -tulpn| grep 202.54.1.2:80
Sample output:
tcp 0 0 202.54.1.2:80 0.0.0.0:* LISTEN 19306/apache2
How to Reset Password for root in MySQL
- Go to mysql command prompt (or run in command prompt and go to mysql/bin)
- Type SET PASSWORD FOR root@localhost=PASSWORD(”);
- Type Flush Previleg;
- Done!
TiddlyWiki is a single html file which has all the characteristics of a wiki – including all of the content, the functionality (including editing, saving, tagging and searching) and the style sheet. Because it’s a single file, it’s very portable – you can email it, put it on a web server or share it via a USB stick.
មិនមែនជារឿងអ្វីថ្មី ហើយលំបាកពេកទេ Lighttpd or Lighty ជា Web Server ដែលប្រើ Resource តិចហើយស្រាល។
ដើម្បីដំឡើងសូមធ្វើដូចខាងក្រោម:
ដំឡើង Package ដែលយើងត្រូវការ
sudo apt-get install lighttpd php5-cgi
ដំណើរការ fastcgi module និងphp configuration ជាមួយ
sudo lighty-enable-mod fastcgi sudo lighty-enable-mod fastcgi-php
ដំនើរការឡើងវិញ lighttpd daemon
sudo service lighttpd force-reload
បង្កើតឯកសារ /var/www/index.php ដែលមានឃ្លាដូចខាងក្រោម: (ដើម្បីពិនិត្យថា web server ដំនើរការរឺទេ)
<?php phpinfo(); ?>
ចូលទៅ broswer ហើយបញ្ចូលអាស័យដ្ឋាន http://localhost/index.php
I had a working dual boot Ubuntu 10.10 and Window 7. After installing, Window 7 will create bootloader file which disable Ubuntu from loading.In order to be able to use Window and Ubuntu peacefully at the same time, where you can have menu to select which OS you want to load, the following step might be handful to you. There are the steps I did and It works fine with my case.
The thing that I did are:
- used the supergrub to detect and boot to Ubuntu 10.10
- Reinstall grub2 using command
sudo apt-get install grub-pc
- Remove the configuration of grub legacy
sudo rm -f /boot/grub/menu.lst*
- Upgrade to grub2
sudo upgrade-from-grub-legacy
Remember to choose the right harddisk and partition you have installed Ubuntu.
- Update the grub2 (this will generate grub.cfg file)
sudo update-grub
By updating it detect the configuration and stored it to grub.cfg, it also detect the window partition.
Now I have grub which show both working ubuntu and window to choose from.
Reference:
Grub2 Ubuntu Wiki
SuperGrub
Select all texts inside the file and delete it, Save.
And, on the terminal: