Tag Info

Hot answers tagged

9

sudo python -m SimpleHTTPServer 80 Ports below 1024 require root privileges. As George added in a comment, running this command as root is not a good idea - it opens up all kinds of security vulnerabilities. However, it answers the question.


8

Advantages of Ubuntu: LTS releases are supported for 5 years for the server seed. Ubuntu has been certified to work on certain hardware For those wanting more up-to-date packages & are willing to use a non-LTS release, the 6 month release cycle means that a new stable release happens more frequently than with Debian Ubuntu has some better integration ...


7

If you want a machine for local development (a desktop machine), and you want to learn a lot - then go with Arch. It will kind of force you to learn about some under-the-hood things about GNU/Linux because you have to assemble everything from command line, so be prepared, quite a lot of reading will be required although it's not actually that hard as people ...


7

Download the netinstall iso, boot it and select non-graphical install. I actually made a video once for it: http://www.youtube.com/watch?v=JOGSupJury4 The difference between ubuntu and debian is the way they are doing package testing. Debian is all about stability and ubuntu is more about all the new things (less stability).


7

This is a big topic, but I'll try to keep it short. You could try DevStack, which will get you up and running with less configuration work. If you want to really understand the inner workings of the platform, and since you have the hardware, I would go ahead and install it from scratch on your distro of choice (CentOS and Fedora are fully supported ...


6

Actually, a slight modification to warl0ck's plan (because I'm paranoid) create the new partition boot to single-user mode mount the new partition as /new_var or something, and rsync as described you might as well run aptitude autoclean before running rsync, to reduce the amount getting copied over (or even ... clean if you don't mind re-downloading your ...


6

Even though password brute force attempts may not be successful on your system, using fail2ban has other benefits than simply blocking the attack: Keeps your auth log from filling up too much, saving disk space and making analysis easier. Reduces unnecessary CPU cycles and bandwidth servicing bruteforce attempts. fail2ban is a great tool for more than ...


5

For Apache, see if http://httpd.apache.org/docs/2.2/en/mod/mod_userdir.html#userdir and http://httpd.apache.org/docs/2.2/en/howto/public_html.html helps.


5

You're probably looking for mod_userdir: "This module allows user-specific directories to be accessed using the http://example.com/~user/ syntax." Don't be scared of fiddling with the config, just have backups of the config files and make sure your firewall blocks your apache to the outside world.


5

The option accesslog.filename is for the mod_accesslog module, so you need to load that module. server.modules += ( "mod_accesslog" )


5

Assuming this isn't a typo, the install section in your typo service file contains a typo. It should be, multi-user.target instead of mulit-user.target (multi vs. multi), e.g: [Install] WantedBy=multi-user.target


4

There is no such thing like a "system' webserver in unix and different "methods". You can install software on your system which contains a simple webserver and use it or not. python -m SimpleHttpServer just loads the SimpleHttpServer module, which contains a basic webserver. Something simliar exists for Perl, just have a look at CPAN: ...


4

I assume that your gateway device to the internet does NAT (network address translation), i.e. your home network uses for example a private network like 192.168.0.* and you dynamically get one IP from your ISP which is used by the gateway. In that case someone on the internet only is able to access port 80 on your home network web-server, when you have ...


4

There are many tutorials for apache on how to do this. This is one of them. Here is another one One thing that you would change if you already have a certificate generated you would copy the certificate files to appropriate locations vs. generating them yourself. If you are not using apache please post the webserver you're using.


4

If you have mod_status enabled (and possibly ExtendedStatus set to On), and you're in a whitelist like this: # # Allow server status reports generated by mod_status, # with the URL of http://servername/server-status # Change the ".example.com" to match your domain to enable. # <Location /server-status> SetHandler server-status Order deny,allow ...


4

Generally, your thoughts are all in the right direction. Specific answers to your questions: "Can I run a cron which will push via rsync or SMB to the NAS box?" Yes, absolutely. "How would I use rsync to pull down the /home directory on my remote server? Is it easy? Yes, here's the command I use. Check rsync docs for explanations: rsync -vrltpz --force ...


4

There really isn't any "right" distribution. The good thing about free/libre/open source software is that most of them are available free (as in beer) as well. So you can experiment with whatever distribution you like, see if it fits your needs and try another if it doesn't. Your requirement to host web apps is perhaps a bit too general. LAMP ...


3

The reason that your output is not display is because you are not following the CGI protocol. You must send server response headers before any other output. TOP=`top -n 1`; PS=`ps aux`; echo "Content-Type: text/plain" # response header echo "" # end of headers echo "that's top\n" $TOP; echo "ps\n" $PS; Use text/plain will give ...


3

The output of plain top is not suitable for displaying on anything but a terminal. You should use the -b switch to get plain text output. And the end of line characters are going to get stripped (replaced by spaces) by your shell with what you're doing - there's no reason for you to store those outputs in variables, you could simply run those commands when ...


3

Your question is quite subjective, and configuring the port should be very easy with any http server. Though, I would recommend lighttpd with server.port = 1080 (or whatever above 1024 for non-root users) in a configuration file: server.document-root = "/home/foo/www" server.port = 1080 It's a complete enough http server, and for serving static ...


3

You need to make the public_html and the files there readable by the web server. One way is to run chmod o+x /home/user (allow everyone to switch to the home directory) and chmod -R o+rX /home/user/public_html (make public_html and files there readable by everyone). If you need better access controls, use ACLs.


3

When you execute anything as a shell escape from the webserver or any other program the environment settings quite likely don't get applied. For example variables like: PATH, LD_LIBRARY_PATH, etc have their default settings or no settings whatsoever so when you are doing the shell escape you should at least do the following: Call the program by full path: ...


3

If you have root, you could just use tcpdump and grab everything. You can then pull it up in Wireshark and analyze to your heart's content. $ sudo tcpdump -i <interface> -w mycapture.tcpdump ... and then hit ctrl-c when you've had enough. Run in a screen session if you need to detatch, etc. By default, it'll only capture the first part of each ...


3

ntop is probably your best solution for doing this. It is designed to run long term and capture exactly what youre looking for. It can show you what remote destinations are being used the most, how much traffic sent to/from, what protocols and ports were being used etc. It can do the same for the source hosts if you run it on a router so you can see the same ...


3

RAID is resyncing HDD There are 2 hints: "State : active, resyncing" "Rebuild status : 17% complete" It seems that your system is rebuilding your array (or it did not finished syncing it during installation). It should be bootable again once the array is finished rebuilding. For the time being, you could ty to boot in degraded mode at least. You can ...


3

If you're only serving static files, you don't need modify the config. The defaults are secure. Anyway, the OpenBSD FAQ is your friend, particularly the section about apache+chroot. In the future, nginx will probably replace apache in base.


3

Note: $CATALINA_HOME is where Tomcat is installed. If the application is a WAR file, just drop it in $CATALINA_HOME/webapps and TC will automatically create the web app for you. If you have all of the contents of the application, you must distribute as so: The root path of your application: $CATALINA_HOME/webapps/newfolder Define your web.xml file here: ...


3

If you have no control over the network whatsoever and also no control over the clients computers and your server is not accessible from outside, I'm afraid it not possible. Imagine it would be, what would prevent you from redirecting google or stackexchange to your server? What you can do is to ask the administrator to create a DNS entry for abcd to point ...


2

Using an old PC for a low-computing-power application is often a false economy. You're likely to have to do a lot of maintenance as part fail (and direct costs to replace these parts if you can't find spares). You'll also be using ~100W of power where a single-board computer might use ~10W. If you already have an always-on modern PC, and your application ...


2

Start it in a screen session. screen Now start the process: myprocess Then, detach the screen session with Ctrl+a d. You can reattach to the screen session again by typing: screen -r If you have more sessions running you can list them with: screen -ls



Only top voted, non community-wiki answers of a minimum length are eligible