WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Can't edit nginx index.html  (Read 301 times)

Offline nbctcp

  • WikiUser
  • *
  • Posts: 6
Can't edit nginx index.html
« 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

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 10106
Re: Can't edit nginx index.html
« Reply #1 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

Offline nbctcp

  • WikiUser
  • *
  • Posts: 6
Re: Can't edit nginx index.html
« Reply #2 on: June 14, 2018, 09:26:44 AM »
almost correct but after restart the changes gone
any idea?
tq

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 5930
Re: Can't edit nginx index.html
« Reply #3 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.

Offline nbctcp

  • WikiUser
  • *
  • Posts: 6
Re: Can't edit nginx index.html
« Reply #4 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

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 5930
Re: Can't edit nginx index.html
« Reply #5 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.

Offline andyj

  • Hero Member
  • *****
  • Posts: 611
Re: Can't edit nginx index.html
« Reply #6 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.

Offline nbctcp

  • WikiUser
  • *
  • Posts: 6
Re: Can't edit nginx index.html
« Reply #7 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