Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: nbctcp on June 14, 2018, 06:58:19 AM

Title: Can't edit nginx index.html
Post by: nbctcp on June 14, 2018, 06:58:19 AM
I try to edit /usr/local/nginx/html/index.html, but it said Read ony file system.
How to modify it

tq
Title: Re: Can't edit nginx index.html
Post by: Juanito on June 14, 2018, 07:14:24 AM
Code: [Select]
$ sudo cp /tmp/tcloop/nginx/usr/local/nginx/html/index.html /usr/local/nginx/html
$ sudo vi /usr/local/nginx/html/index.html
Title: Re: Can't edit nginx index.html
Post by: nbctcp on June 14, 2018, 09:26:44 AM
almost correct but after restart the changes gone
any idea?
tq
Title: Re: Can't edit nginx index.html
Post by: Rich on June 14, 2018, 09:59:54 AM
Hi nbctcp
almost correct but after restart the changes gone
any idea?
tq
Yes, add the line:
Code: [Select]
usr/local/nginx/html/index.htmlexactly as spelled to your  /opt/filetool.lst  file and run a backup before rebooting.
Title: Re: Can't edit nginx index.html
Post by: nbctcp on June 14, 2018, 10:15:38 AM
SOLVED
small correction
these the steps

# cp /tmp/tcloop/nginx/usr/local/nginx/html/index.html /usr/local/nginx/html
# vi /usr/local/nginx/html/index.html
# echo '/usr/local/nginx/html/index.html' >> /opt/.filetool.lst
# filetool.sh -b
Title: Re: Can't edit nginx index.html
Post by: Rich on June 14, 2018, 10:24:16 AM
Hi nbctcp
SOLVED
small correction
these the steps

# cp /tmp/tcloop/nginx/usr/local/nginx/html/index.html /usr/local/nginx/html
# vi /usr/local/nginx/html/index.html
# echo '/usr/local/nginx/html/index.html' >> /opt/.filetool.lst
# filetool.sh -b
No, the leading slash should be omitted.
Title: Re: Can't edit nginx index.html
Post by: andyj on June 14, 2018, 11:01:14 AM
Eventually you will want to have your website in a separate directory tree. Keep configuration files in /usr/local/etc, executables in /usr/local/bin, and data files somewhere else altogether such as /srv, /var, or something like this. This isn't Windows, so you can actually keep your system properly organized.
Title: Re: Can't edit nginx index.html
Post by: nbctcp on June 14, 2018, 05:58:23 PM
Hi nbctcp
SOLVED
small correction
these the steps

# cp /tmp/tcloop/nginx/usr/local/nginx/html/index.html /usr/local/nginx/html
# vi /usr/local/nginx/html/index.html
# echo '/usr/local/nginx/html/index.html' >> /opt/.filetool.lst
# filetool.sh -b
No, the leading slash should be omitted.
Just tested
the result will be the same with leading slash or without
/usr/local/nginx/html/index.html
but I must type
filetool.sh -b
otherwise /opt/.filetool.lst won't be persist

tq