No password for sudo
Open file /etc/sudoers and uncomment following line.
%sudo ALL=NOPASSWD: ALL
Save the file.
Now if you run commands with sudo, it does not ask user password.
%sudo ALL=NOPASSWD: ALL
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /your-web-project-directory-name/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /your-web-project-directory-name/index.php [L] <IfModule>
$ sudo a2enmod rewrite $ service apache2 restart
Restart apache2.AccessFileName .htaccess <Directory /var/www> AllowOverride All #AllowOverride None </Directory>
<Directory /var/www/project-name> AddHandler cgi-script .cgi Options +Indexes +ExecCGI AllowOverride all </Directory>