How to configure Nginx autoindex to edit files? - file

I have configured Nginx with autoindex module to enable Directory Listing. But I want to extend this feature to enable file editing as well and saving it.
The thing is I have some Private IPs which needs to be monitored and I have added those IPs in a file and made a script to take IPs from the file and monitor them by Pinging. Since sometimes these IPs change due to DHCP, Apart from System Admins, No one is much proficient in using Terminal. Hence I wanted to provide a webUI, so that concerned persons change this IP whenever through webpage. I know this can be possible using code, but since am not a developer, I was finding a way through here. Is it possible?

No, it's not possible using nginx alone.

Related

Per machine variables in ExtJS 7

I am developing an app using ExtJS 7 and have a team of developers.
Each user is getting their external API's from a different source, i.e some localhost, some 192.168.1.100 etc etc
Is it possible to write something like an env file that each developer can add to their directory root and then I can pull in a variable into the app?
There is a way in pretty much every other system these days, but it seems Ext doesnt do this apart from hardcoding the value into the app.json but as this is committed to source control, it gets really messy
Something simple like
API_URL=https://localhost/api
If anyone has developed something like this, could they please share, I haven't been able to find anything
Just let them setup a common local development host-name, either in /etc/hosts or C:\Windows\System32\Drivers\etc\hosts. This file is being queried, before any DNS server will be queried - so it could even be the host-name of the public API, which still would resolve locally.
127.0.0.1 localhost
# 127.0.0.1 api.local
192.168.1.100 api.local

Best way to generate Ansible documentation

I'd like to generate documentation pages about the hosts I manage with Ansible, and upload them to a web server.
What would be the best, non-hacky way of achieving this?
I want the HTML template to list IP addresses of hosts, and the values of many hostvars.
I noticed that when I run my inventory script, many of these variables are listed under _meta hostvars, but all the jinja expressions are non interpolated: i.e. the "{{expressions}}" are not expanded out.
I'm finding that because I'm executing the role to generate the documentation on the web server host only, many of these variables are not available in the template.
For example the IP addresses of other hosts are not available, and fail with: 'dict object' has no attribute 'ansible_default_ipv4'
Enable fact caching https://docs.ansible.com/ansible/latest/plugins/cache.html
Execute setup module on every host in question
Collect required information from fact cache with some script

"Respawning" Files in Cpanel

So straight to the point- Im trying to clean my host entirely (databases too) and after I delete the last 2 files wp-content and wp-includes (700MB of files) they get restored instantly. This may be a simple question but for me it s very odd and I don`t get it. Besides file-manager i used Filezilla too and the same thing happens(my hosting company as it su#%$ failed to give me a reply after 48h).
I have recorded a short video of my problem to help you better understand my issue.
https://www.youtube.com/watch?v=wqL35R0-vvw&feature=youtu.be
Hope you`ll be able to help me. Thank You !
I`m working on this website for an NGO after it was hacked and for now I want to wipe every single file from the server and rebuild it but those files which have inside infected pages(php scripts) wont get deleted
Chances are very good some of those files are owned by the webserver, especially if you were compromised via a WordPress vulnerability. As they're owned by the webserver and not your user, you're unable to delete them.
If you have root/sudo access, you can use that on the command-line to remove them. If you don't, you'll need your host to help.

Full and detailed list of files at a domain?

I want something that creates a full list of all files/paths at a domain (mine),
including size and modification date. I want the list to begin all the way at
the root - not just past /public_html. I'd want to run this from my Win7 64
bit PC and have the list saved on my PC.
I do NOT want to DL all the files !
Is there a Win7-64 tool I can use to accomplish this ??
When you say files/paths "at a domain", in general you have a misunderstanding. A domain is basically a name that points to a resource see here.
If this sounds kind of vague, it's because it is. Multiple computers can host a domain (ie. serve up resources for the same domain), and the resources they serve up don't have to be files at all. You can point your browser at http:// somesite/somefile.html, and that "somefile.html" may not exist at all (yet the site could still return a webpage).
You can't (in general) list all the files/paths at a "domain", but if you have access, you can certainly do that for one or more computers. Certain websites may provide a way to get a directory listing, but even then it would just be from the "DocumentRoot" (in Apache terms) of the website (not from root).
EDIT: IF your domain is hosted on a single computer, and you have full access through ftp, you could use something like the python script in the answer here to get a remote directory listing (of this computer). You probably need to change the line that says this:
ftp.login()
to this:
ftp.login(user='your username', passwd='your password')
While it may seem like the same thing, what you're really asking for is a remote directory listing of a computer, not a domain (even if a dns lookup resolves your domain to a computer).

Webfaction Upload Difficulty

So the problem is I'm not used to FTP clients and managing files with apps and directories. Webfaction has you connect to the domain and server (username.webfactional.com; listen to port 22) and once your in, you see the files already there (like bin, lib, webapp->django, etc). What I don't get is how do I get my source code files uploaded so that they appear on my domain (cooldomainname.com)?
I think the part you are missing here is how WebFaction lays out the structure for your account, applications, and web sites. You can see some of the ways they set things up here:
http://docs.webfaction.com/user-guide/examples.html
The answer to your question is:
You need to put the files, depending on the file type (if it is static or php and you have an Static/CGI/PHP application set up), in the /home/username/webapps/appname directory. You can view your apps by looking through the information in the WebFaction docs and following them through their control panel to the information you need.

Resources