Problems activating "mod_rewrite" (I can't edit 000-default file)
Hello everyone,
Maybe an expert could help me..
I'm trying to activate mod_rewrite module on a Ubuntu 11.04 server (natty) and I having problem to edit the file 000-default in 3rd step, the steps to activate the module are:
1-Install Apache web server in Ubuntu Linux
2-Enable mod_rewrite module in Apache web server with:
3-Edit the site file 000-default located in: /etc/apache2/sites-enabled/ directory, changing all AllowOverride None to AllowOverride All:
4-And finally, restart Apache with:
The file looks blue when I see it in terminal with "ls" and a print is as below:
I have sudo access, using vim I can do the changes but when I try to save changes I receive: E45: 'readonly' option is set (add ! to override) Why this is happening?
How can I edit this file?
It is a symbolic link so the permissions are determined by those of ../sites-available/default. You can either change these permissions or use :w! to write the file..
This User Gave Thanks to Scrutinizer For This Post:
I've just see the ../sites-available/default I didn't know about that relation.
So, you meam if I edit ../sites-available/default will be enough and that edition will automatically change the 000-default file?
Thanks for help so far.
When you do vim 000-default, you are really editing ../sites-available/default through the symbolic link. If you change the permissions like this: chmod u+w 000-default - which means you are giving write access to the owner of ../sites-available/default - then you will no longer get that message..
Alternatively if you exit vim after your changes, using :w! you should be able to override the readonly permissions..
This User Gave Thanks to Scrutinizer For This Post:
It is u+w , not u+v (see man chmod) . The permissions weren't 777, because those belong to the symbolic link, not the actual file (../sites-available/default).. You can check the permissions of that file with
alternatively if you use
ls will follow the symbolic link and display the permissions of the actual file. I would expect the permissions to be 444 ( -r--r--r-- )
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hi
Is it recommended to edit the file "/etc/environment" directly using vi ?
(like by adding some export something= value staements)
or
do we need to edit /etc/profile file
in order to set the environment variables, globally to the entire AIX LPAR
please suggest. (5 Replies)
Basically I want to shorten URLs on my html pasting site (pasteht.ml), by using "/~a1Pha" instead of "/paste/a1Pha". The ID is 5 numbers and letters, both cases.
For example:
/~idnum serves /paste/idnum.htm
/=idnum serves /paste/idnum.htm
/paste/idnum redirects to /~idnum (to update any old... (0 Replies)
Hello,
I am using VirtualBox to simulate a small network with two Linux computers, the host is Mac OS X. My problem is that I can't send "write" and "wall" messages from the host to one of those Linux computers.
Here is what works:
- The virtual Linux computer answers "ping" messages that have... (5 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)