Tag Archives: solaris

How To Setup a LAMP Server on Debian Linux 8 (Jessie)

How To Setup a LAMP Server on Debian Linux 8 (Jessie)

How can I setup up a LAMP (Linux, Apache, MySql, PHP) stack on Debian Linux version 8 (Jessie) using command line options?
Halal Vitamins

Powered by WPeMatico

Linux / Unix: Shell Script Find Out In Which Directory Script File Resides

I need to find out in which directory my bash script resides so that I can read config file called .backup .ignore .target. For example, if my script resides in >/home/foo/script.sh, I need to read /home/foo/.{backup,ignore,target} files. How do I find out the current directory location and shell script directory location in Bash running on Linux or Unix like operating systems?

Read answer to: “Linux / Unix: Shell Script Find Out In Which Directory Script File Resides

Tweet this    Share on Facebook

Powered by WPeMatico

W: TMPDIR is Mounted noexec, Will Not Cache Run Scripts Error and Solution

I mount /tmp with nodev, nosuid, and noexec options to increase the security of my Linux based web server. And, whenever I ran apt-get install or apt-get upgrade command, I am getting the following error: Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-43-generic
Found initrd image: /boot/initrd.img-3.2.0-43-generic
....
ldconfig deferred processing now taking place
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.2.0-43-generic W: TMPDIR is mounted noexec, will not cache run scripts. ....
...
How do I fix this problem without compromising security of the data or web-server?

Read answer to: “W: TMPDIR is Mounted noexec, Will Not Cache Run Scripts Error and Solution

Tweet this    Share on Facebook

Powered by WPeMatico

Unix: csh Shell Loop Example

Can you give me a simple loop example in csh shell in Linux or Unix like operating systems?

Read answer to: “Unix: csh Shell Loop Example

Tweet this    Share on Facebook

Powered by WPeMatico

Nginx Redirect Mobile / Smart Phone Traffic To Mobile Version Of the Web Site

I am a new nginx user and I would like to redirect all mobile / smart phone users from www.example.com to m.example.com domain. How do I detect a mobile phone browser in nginx? How do I redirect all mobile users to sub-domain using regex based rules? How can I automatically redirects visitors on mobile devices to its mobile version at http://m.example.com/ and also allow mobile devices to the desktop website at www.example.com if visiting via http://www.example.com/?desktop=true?

Read answer to: “Nginx Redirect Mobile / Smart Phone Traffic To Mobile Version Of the Web Site

Tweet this    Share on Facebook

Powered by WPeMatico