Hot answers tagged

7

You need to provide a hostname for the server host. Typically you can do this one of three ways: 1 Through a DNS Zone If you have control of the DNS server for your LAN (assuming you only want external access; or control of a domain/zone DNS server for wider Internet access) you can add a host (A) record pointing a given name to the IP address. 2 Through ...


6

You forget to add handler for php script. Have you tried this wiki yet?


5

When configuring Subversion, try ./configure --with-apr=/usr/local/apr/ That might not be exactly the right path. Try finding apr-config and giving the path to that. I'm guessing it might be: ./configure --with-apr=/usr/local/apr/bin/apr-config Try ./configure --help to see what your options are. There are a lot of them.


5

The equivalent is in /srv/http. You can find some discussion about its use in Arch in this mailing list post and this bug report (albeit only tangentially, those links discuss using it as a location for installed packages).


5

Your problem sounds exactly like the one that's described here: Shared folder in VirtualBox for Apache Try to add this setting to your Apache configuration: EnableSendfile off


5

From a networking point of view your Operating System sees two network interfaces. One is purely logical and created in software and doesn't even need a physical set of chips and connections to make up a network connection. The other is a physical network connection (most likely with an RJ-45 socket or a wireless adapter) and can be used to connect to other ...


5

This is not how certificates work. You can't generate a private key for an existing SSL certificate. First you generate the key pair (private + public), then you generate a CSR (containing your public key) that you forward to the CA (Comodo in this case) which will provide you with the certificate to install on your server. Perhaps the private key is ...


4

Is there something you wouldn't be getting with the Subversion package in the default channel? Step-by-step guide to installing subversion on RHEL


4

I found that the issue was a mistake with handling double quotes in configure file of the source of subversion. I had to compare the line which gave the mismatch error with the configure file in subversion 1.7.14. I had to change the line $EGREP "[apache_minor_version= *"$apache_minor_version_wanted_regex"]" >/dev/null 2>&1; then to $EGREP "...


4

Filesystem ACLs are going to be your best solution here. You can set a default ACL on directories, and when a file is created in that directory, it inherits the default ACL. You can then set this default ACL to allow access to the files. For example, if you wanted to grant all users of the group mygroup read/write access to /var/www, you can do: setfacl -...


4

You use Apache environment variable manipulation. So for example: SetEnv db_pass swordfish This can be done in httpd.conf or in .htaccess. You can also set env vars in Rewrite Rules like this: RewriteRule someurl - [E=dbpass:swordfish]


4

Maybe AuthLDAPInitialBindAsUser (Apache 2.3.6) can help: Determines if the server does the initial DN lookup using the basic authentication users' own username, instead of anonymously or with hard-coded credentials for the server In combination with AuthLDAPInitialBindPattern, something like this might do the trick (untested): AuthType Basic ...


4

Built-in Webserver If your goal is to learn PHP I highly recommend you use PHP's built in webserver, available on PHP version 5.4 and up. cd ~/mywebsite php -S localhost:8080 You now have a webserver, tied to the ~/mywebsite directory, and accessible in the browser at http://localhost:8080 This all runs in user mode so you don't need to sudo ...


4

strace uses ptrace() to trace system calls. If a process being traced tries to exec a file with setuid or setgid bits on, the bits will be ignored (and the process will continue to run with the process's existing uid and gid), unless the process is running as root (or has the CAP_SETUID capability). Your web server is (hopefully!) not running as root, so ...


4

(summary of comments) You have a conflicting SSL virtual host from the Ubuntu/Debian default-ssl virtual host. a2dissite default-ssl will fix the immediate problem. The Apache HTTP Server Wiki has a guide to configuring name-based SSL virtual hosts which you should review. The guide shows them all in one file, but you can split the different VirtualHost ...


4

It was a simple syntax issue. vim /etc/php.ini ; Maximum amount of memory a script may consume (128MB) ; http://www.php.net/manual/en/ini.core.php#ini.memory-limit memory_limit = 1536 The problem was with the line I had changed. memory_limit = 1536M If you don't specify the suffix indicating the memory allocation, it does memory ...


4

there are tools like nagios or icinga that can monitor a server. they can monitor a lot more that just http url: things linke ssh, mysql, if disk space gets scarce - -and many more. may be a bit overkill for your use? the services write mails if things fail.


4

A wildcard matches a single left-most label. That is *.example.com matches www.example.com but not example.com or sub.foo.example.com. This means you either need to get a certificate which includes *.example.com and example.com as subject alternative names or if you just need www and the naked domain name then you can can get a cheaper certificate which ...


4

I can think of many solutions for this specific problem : (A) Configure sudo access such that your username does not require password for tail command (or for all commands, if you so require) Refer sudo and sudoers Documentation for this. (B) Configure sudo access with negative timeout. Default timeout is 5 minutes , after that you will have to reenter the ...


4

chmod u+r doesn't do what you apparently think it does; what it actually does is make the file readable by its owner. Which, I'm going to guess, it already was. chmod o+r (make file readable by "others", i.e., not owner/group) would probably work, but security argues against this. Pick one: ls -l /var/log/apache2/error.log ... on my (Debian) system, its ...


3

Q: Is my folder structure correct/ideal? A: Folder structure seems fine. Q: I know I've used recursive (-R) option, but should I be repeating the same for $vhost/www, $vhost/logs and $vhost/backups? A: It would be redundant to run it on those directories Q: Am I correct in thinking that the chmod above is probably redundant? Yes technically it's ...


3

An HTTP request has a number of headers, not just the requested path. One of these headers (the Host: header) is the hostname which you requested (so "unix.stackexchange.com" for unix.SE). Apache looks at this and serves the request appropriately. As a side note: HTTPS used to be restricted to one certificate per IP, because the Host: header is encrypted. ...


3

That file here (Fedora 18) belongs to gdbm-devel, the package containing it for Ubuntu should be named similarly. Check the dependencies for the source, you'll probably need a swath of -devel packages corresponding to each dependency. What do you need an outdated apache, which moreover has known vulnerabilities? Why doesn't the distribution's apache work? ...


3

Well, for a start, PHP isn't doing shell_exec through bash in your case, it's doing it through sh. This is fairly obvious from the exact error message. I'm guessing that this is controlled by whatever shell is specified in /etc/passwd for the user that the web server is running as and shell_exec doesn't capture stderr, in combination with that when you run ...


3

You're probably running into SELinux issues. The directories on the flash drive probably aren't labelled such that httpd_t can touch them. You can do a setenforce 0 ; service httpd restart and attempt to access again to confirm. If that is what's going on then you can either configure SELinux to go into permissive mode (last ditch "just trying to get it to ...


3

How do I connect to my Linux-based servers? SSH is the de facto standard way of managing Linux-based servers. Is there something similar to Remote Desktop? Yes, NX (freeNX, or Nomachine NX) works over SSH, it's very common in enterprise environments. Also you can use VNC, or Citrix, and RDP is also possible. Do I need to use straight command line Linux ...


3

The PHP.CGI.Argument.Injection exploit allows remote code execution on PHP if used as a CGI and if version <= 5.3.12 or <= 5.4.2. Your seeing those lines in the firewall's logs does not mean that you're vulnerable, only that someout out there thinks that you might be. To that effect, but that is only my opinion and I had several experts disagree ...


3

There's a few different options available to you. Here are the ones I can think of; each has its own merits and disadvantages. You can set the world execute bit on the parent directories. That way, anyone who knows the full path to a file will be able to access it, but no one else can. This still does leave well-known files up for grabs though unless you ...


3

It's called URL re-writing. You can do that in Apache with RewriteEngine, either directly in Apache's configuration, or with .htaccess (there's really no difference). And you can do that on many other web servers (I like nginx for its performance and its ease of configuration). When you re-write the URL, you assign the dynamic parts of the URL (in your ...


3

The problem here is, you're reading from the Apache log and writing to it at the same time. Whatever you added to the log also makes it back into the pipeline through the cat call (no wordplay intended :) ). This creates a nasty positive feedback loop that will keep working until your file system fills up. The answer to this question may be interesting to ...



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