51
votes
Accepted
Unix system(“unzip archive.zip”) Extracting Zip Files Silently
man unzip:
-q perform operations quietly (-qq = even quieter). Ordinarily
unzip prints the names of the files it's extracting or testing,
the extraction methods, any ...
31
votes
Accepted
What are the correct permissions for a systemd .service?
Any local user can read the definition of any systemd system unit through the DBus interface (for example using systemctl show someUnitName), unless you have a custom DBus policy in place to prevent ...
18
votes
Accepted
How to block clients by IP address from accessing certain URLs on my web server?
This may be more heavy weight than you're looking for, but you might consider using fail2ban (https://www.fail2ban.org). That's a tool that can monitor your log files and automatically ban addresses ...
18
votes
Accepted
What is the difference between AmbientCapabilities and CapabilityBoundingSet?
They're complete opposites:
AmbientCapabilities grants capabilities that the process normally wouldn't have started with.
CapabilityBoundingSet limits capabilities the process is allowed to obtain. ...
16
votes
Accepted
tomcat 8 will not start after initial install
I had the same problem, fixed it by:
giving tomcat user ownership of the whole tomcat directory:
cd /opt && sudo chown -R tomcat tomcat/
and commenting out below line in /etc/systemd/system/...
14
votes
Accepted
Apache SSL: server cert does not include ID which matches server name
Okay, I noticed that this post is viewed quite often recently and so it seems that a lot of people are facing the same issue that I did. If so then this might help you.
I have followed a simple step-...
10
votes
Unix system(“unzip archive.zip”) Extracting Zip Files Silently
From the unzip man page:
-q
perform operations quietly (-qq = even quieter). Ordinarily unzip prints the names of the files it's extracting or testing, the extraction methods, any file or zipfile ...
10
votes
How to determine which webserver is installed with no information?
A basic approach would be to use netstat -tnlp with an additional grep on the browser ports that it is supposed to be serving. Typically, that would then be:
netstat -tnlp | grep 80
netstat -tnlp | ...
9
votes
How many processes can listen on a specific port?
Q: How many processes can listen on a specific port?
A: as many as you can spawn.
However for SOCK_STREAM sockets at least, and unless you use the SO_REUSEPORT option (new in Linux 3.9), a process ...
9
votes
systemd - My custom service exits with status code 216/GROUP
Group=nobody
When the error message tells you that there's a problem setting the group that the service runs as, which is what that status code is doing, really your first thought should be "Have I ...
8
votes
Accepted
login with apache user
The www-data user is evidently configured with /sbin/nologin (or equivalent) as its shell, and thus the system will not allow you to login to that account. sudo lets you run a command as any user on ...
7
votes
Simple command line HTTP server
A simple fix/enhancement to a slightly unfairly (imho) down voted answer might also work. Let's set up the html file first ...
echo '<html><head><title>My Test File</title><...
7
votes
How to block clients by IP address from accessing certain URLs on my web server?
Don't. At best you'll achieve nothing but making your logs less cluttered; at worst you'll end up blocking legitimate visitors who happened to get (via DHCP) an IP address that used to belong to ...
7
votes
Accepted
find command of nobody runs on every fresh boot in the morning - debian stretch
The find is indeed part of updatedb, which runs daily, triggered by the cron daemon.
You can verify by comparing the find parameters from your process list against the configuration in /etc/updatedb....
7
votes
Accepted
How to use asciinema offline?
Just pass asciinema rec a file name as an argument, in which case it will simply save the recording to the local file and not try to upload it to the server. For example:
$ asciinema rec demo.cast
...
6
votes
Simple command line HTTP server
Simple Ruby one liner to serve a directory:
ruby -run -e httpd . -p 8080
6
votes
How can I start the python SimpleHTTPServer on port 80?
Do something like :
python -m SimpleHTTPServer 50505
Where 50505 is the port number.
6
votes
Apache SSL: server cert does not include ID which matches server name
In my case I have resolved this by replaced in my apache ssl config file for each concerned domain :
ServerName mydomain.com
ServerAlias www.mydomain.com
by :
ServerName www.mydomain.com
...
6
votes
Accepted
Can't ssh into my server from home linux but can ssh into same server from windows
I've found solution for this problem (sorry for answering my own question).
I'm answering it because If someone has this problem then he/she can use solution that I found.
Actually problem is on both ...
6
votes
Accepted
Problem running CURL with the dns option
The curl binary that's built for Debian and Ubuntu doesn't contain support for libc-ares. That's because that library can't return both A (IPv4) and AAAA (IPv6) queries in a single response, so if ...
5
votes
Accepted
OpenBSD httpd.conf conditionals
while httpd supports using patterns in the context of some keywords (alias match, location match, server match) the functionality you are looking for is not implemented in httpd.
i see two ways to ...
5
votes
Accepted
Should I deploy with the same user who is running the website?
Actually, the files should not be owned by www-data because that means Nginx can modify them, which in most cases is not what you want (unless it is a CMS that needs to self-update.)
So all the files ...
5
votes
Accepted
create a virtual machine from the CLI? (KVM)
Just use:
virt-install \
--name vm_name \
--ram=2048 \
--vcpus=2 \
--disk pool=guest_images,size=30,bus=virtio,format=qcow2 \
--cdrom /var/iso/debian.iso \
--network bridge=kvmbr0,model=virtio \
--...
5
votes
Accepted
How to download adminer with wget?
The -mysql and -en portions are optional:
wget https://www.adminer.org/latest.php
will download the latest version,
wget https://www.adminer.org/latest-en.php
will download the latest version in ...
5
votes
Accepted
Invalid SSL certificate only on my Linux machine
This sounds like Chrome doesn't have access to the necessary CA certificate. A quick check with ssllabs.com suggests that your site is missing an intermediary certificate. When you purchase a ...
5
votes
Accepted
Download list of directory/file names only from web server index
HTTP protocol has no feature to request a "list of files" from an HTTP server.
curl / wget/ browser requests a URL, which contains an arbitrary request string and the server sends back some arbitrary ...
4
votes
Accepted
what is best directory for storing uploaded files / images from my website
There are several factors to consider before choosing a directory path. The best directory is the one that has enough capacity to store the expected volume of files, that has the right level of ...
4
votes
Simple command line HTTP server
try caddy
curl https://getcaddy.com | bash
serve content from /var/www
caddy -root /var/www "browse"
now you find the server at http://localhost:2015
https://caddyserver.com/
https://nwgat.ninja/...
4
votes
Accepted
Is there a tutorial to set up a shared hosting server?
In a shared web-hosting environment, there are a couple issues that you need to address right off the bat.
Regarding directory permissions and only being able to access your files: what you want to ...
4
votes
Accepted
How to install php7 modules in archlinux?
Ok, here it is answered by pierre schmitz, thx nymous for the link:
openssl, phar and posix modules are now built in php7 core. Remove the corresponding directives from your php.ini, e.g. ;extension=...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
webserver × 592linux × 107
ubuntu × 78
apache-httpd × 62
centos × 51
nginx × 51
debian × 47
networking × 39
permissions × 39
ssh × 37
security × 36
php × 36
dns × 22
command-line × 20
iptables × 16
ip × 16
http × 16
python × 15
virtual-machine × 14
domain × 12
users × 11
configuration × 11
apache-virtualhost × 11
web × 11
file-server × 11