Apache :: Making All Necessary Changes To Conf Files
May 28, 2014
I recently upgraded my Apache 2.2.22 installation on Win 8.1 to 2.4.9, making all necessary changes (I believe) to the conf files. I am puzzled that two files in the format authdigest_shm.xxxx now appear in my logs directory when the server is restarted. (Edit: there is also no httpd.pid file)I assume this is to do with running digest authentication, but is a new phenomenon since the upgrade.what conf file setting(s) have I screwed up?!
Is there a way to get Apache to tell me which .conf file it is loading at start-up?
There's a box that's misbehaving and Apache is running on port 80 and 8080 on the box... but we can't locate *why* it's running on port 8080. I can't find any Listen 8080 statement in the typical config files. If I knew which config files it was loading, I could go through all of the files in more detail.
I'm setting up a SAAS service which is built on top of Laravel. To put it simply the service itself knows whether its being called from a sub.example.com or just example.com and serves a correct response accordingly. So going to sub.example.com will use the same index.php file as example.com but the routes and controllers within the application will provide a different response. sub.example.com will show a tenant login page where as example.com will show a new tenant subscription page or something else.
So when someone new subscribes I add a new entry to the database with a subdomain name for them and when a request comes from that subdomain and they are logged in it will show them their information. Easy right.
There is a problem though with setting it up with Plesk. When I add a wildcard subdomain, it will look for /subdomains/sub/ for the files which is a bit problematic since I want it to serve the files from the same place as the domain example.com.
Is there a way to configure that so that regardless of the subdomain it will try and serve the exact same content as my main domain?
I've spent the last several months working on a huge upgrade of a couple dozen websites. The upgrades include modifying Apache so that visitors who arrive at links pointing to mysite/World/New_York are redirected to mysite/world/new-york. In other words, all my links now default to lower case, and underscores are replaced with dashes.
Unfortunately, publishing it has been an endless series of disasters. My websites are now all crashed, and the server is unbelievably slow. It takes pages forever to load (if they load at all), and I can scarcely publish files online.So the following notice sent to me by my webhost got my attention.
IT appears your own server IP is making GET requests to Apache, causing excessive loading and causing service failures. On today's date, your IP made almost 6,000 connections to Apache:<br><br>
Is it possible to make these two work together? I can't seem to find any way to let Apache read /home/<username>/public_html without disabling selinux entirely.
I know you can do "chcon -t httpd_sys_content_t -R $HOME/public_html", but it seems like it would be a pain when adding users, especially if someone decides to delete their public_html and make a new directory.
Is it possible to create an exception to let httpd do whatever it wants?
I recently updated to apache 2.2 and when I went to check
/usr/local/apache/conf/httpd.conf
I noticed that a lot of the stuff was missing from what I usually see in apache 1.3 Was a new file created when the update was finish? I used easyapache to make the update.
how should I optimize httpd.conf on my server. Apache was set up by my friend, unfortunately it started to "stuck" lately during peak time. Browser is connecting to a website for a long time before it actually starts to load it.
I am having a problem on my VPS. I am running the latest version of Apache on Windows Server 2K3, and after editing httpd.conf to allow virtual hosts (#Include /conf/extra/httpd-vhosts.conf) and trying to restart the service, an error appears saying the operation failed.
I have even tried restarting/starting the service via services.msc
If I am not using the default httpd.conf Apache will not restart at all... it is very strange. I have also tried doing a repair of the installation of Apache.
I work for a start up as well as do independent consulting. I had a friend set up my apache server initially for the start up. It's been running fine. Now I want to host a client's site on the same server. I tired just adding a vhost section at the bottom of the conf file, but it said that I was running two sites off the same port. I tried manipulating the stuff my buddy did for me for the first site, then putting two vhosts on the bottom, but that just didn't work.
AddModule mod_php4.c AddModule mod_php5.c Then later in the httpd.conf Im trying to tell apache to handle .php4 files with PHP 4 and .php with PHP5
Code: AddType application/x-httpd-php .php AddType application/x-httpd-php4 .php4 I restarted apache to load the new conf. .php files still use PHP5, but for some reason .php4 files are being downloaded, not running with PHP 4.
If I use htaccess to application/x-httpd-php4 php, .php files also force download. What am I missing?
options { default-key "rndc-key"; default-server 127.0.0.1; default-port 953; }; # End of rndc.conf
# Use with the following in named.conf, adjusting the allow list as needed: #key "rndc-key" { # algorithm hmac-md5; # secret "KLGSBmWZrev0I4fR4Tm4GXxdcYSTFzF23b1f9is1M="; #}; # # controls { # inet 127.0.0.1 port 953 # allow { 127.0.0.1; } keys { "rndc-key"; }; # }; # End of named.conf Then i took a look at named.conf
Code: options { /* make named use port 53 for the source of all queries, to allow * firewalls to block all ports except 53: */
//query-source port 53;
/* We no longer enable this by default as the dns posion exploit has forced many providers to open up their firewalls a bit */
// Put files that named is allowed to write in the data/ directory: directory "/var/named"; // the default pid-file "/var/run/named/named.pid"; dump-file "data/cache_dump.db"; statistics-file "data/named_stats.txt"; /* memstatistics-file "data/named_mem_stats.txt"; */ };
logging { /* If you want to enable debugging, eg. using the 'rndc trace' command, * named will try to write the 'named.run' file in the $directory (/var/named"). * By default, SELinux policy does not allow named to modify the /var/named" directory, * so put the default debug log file in data/ : */ channel default_debug { file "data/named.run"; severity dynamic; }; };
// All BIND 9 zones are in a "view", which allow different zones to be served // to different types of client addresses, and for options to be set for groups // of zones. // // By default, if named.conf contains no "view" clauses, all zones are in the // "default" view, which matches all clients. // // If named.conf contains any "view" clause, then all zones MUST be in a view; // so it is recommended to start off using views to avoid having to restructure // your configuration files in the future.
view "localhost_resolver" { /* This view sets up named to be a localhost resolver ( caching only nameserver ). * If all you want is a caching-only nameserver, then you need only define this view: */ match-clients { 127.0.0.0/24; }; match-destinations { localhost; }; recursion yes;
zone "." IN { type hint; file "/var/named/named.ca"; };
/* these are zones that contain definitions for all the localhost * names and addresses, as recommended in RFC1912 - these names should * ONLY be served to localhost clients: */ include "/var/named/named.rfc1912.zones"; };
to open EML files on apache webserver, actually when I load an eml (outlook email message) by using an URL, it shows the email code, it is not pasing it correctly.
What libraries (apache or system) do I need installed to parse this kind of files?
My server is with Centos OS. I have a cache directory which has tons of scrap files. I am unable to delete it. rm -rf dirname gives an error.Is there any way to remove this directory quickly.
how can i hide all files and directories in public_html so when using apps suck Flash Get Site Explorere and similar software it will not show any file or directories in public_html.
I have a client that is certain someone is trying to hack her web-portal. I need to set up something that will alert me on suspicious activity on the server. For example someone fiddling with requests trying to make SQL / shell .. injection and similar threats.
Does any tool (for example bash script with grep) exist that would parse the raw apache logs and report if something is suspicious. Apache logs don't show the POST data so I am talking to admin to setup dump_io apache mod that enables this.
Or am I going into wrong direction here and there is whole another way to do this? I searched the web and forums for anything like this and didn't find anything.
I have moved my sites from old server with Apache 1.3 to new one with Apache 2.2.4. Since that time, the error log is full of these lines:
Code: [Wed Jul 04 05:36:32 2007] [error] [client 212.47.9.194] File does not exist: /home/domain/public_html/russia [Wed Jul 04 05:36:39 2007] [error] [client 212.47.9.194] File does not exist: /home/domain/public_html/russia [Wed Jul 04 05:36:45 2007] [error] [client 213.192.18.2] File does not exist: /home/domain/public_html/italy [Wed Jul 04 05:36:57 2007] [error] [client 83.8.104.181] File does not exist: /home/domain/public_html/mexico The access logs show even more accesses, so sometimes the same page is ok, sometimes it is logged here. The strange thing is that these files (pages) exist! They are accessible through the browser without any problem.
Do you have any idea where could be the problem? It would helped me lot, I am unable to find any real problem now, when error log is full of these.
My OS is Ubuntu 6.06. I use mod_rewrite through .htaccess. I can provide list of apache modules, if it helps.
I noticed that all sites on the server, can not parse php files, tried restarting httpd, recompiling using apache update or easyapache script, and the problem stills.
index.php is at DirectoryIndex, also Addtype shows php extension active at httpd.conf.
but, when I type "php -v" from the shell, i got this message:
Code: php: /usr/lib/libmysqlclient.so.14: version `libmysqlclient_14' not found (required by php)
I found someone with the same problem, tested the solution posted there but it doesnt seems to solve this issue.
I'm moving to a dedicated server for first time in my life and I have some questions that I want to share with you all.
I have run many scripts like joomla, vbulletin, etc, and I have found that when I install a module or template or when I upload images using this scripts, the permisions of this files are wrongly assigned as they belong to apache:apache instead of myuser:mygroup.
The problem is that as my new server is going to be fully managed, I am not going to have root access to chmod this files to the right myuser:mygroup and as a consecuence I'm going to be unable to dmove or delete them usinf my ftp or shh user acount.
Hope you can help me this this issue. I need to tell my hosting company what I want to do to avoid this way of working but I have no idea of how can this be solved
When a user enters the whole url to a file on the webserver he/she can view this file. I want to prevent this and only allow access to the files from within the application (under apache). How can I do that? I already tried:
<Directory /var/www/html/folder/files> order deny,allow allow from localhost </Directory>
This works BUT the file also isn't viewable from within the application anymore.
I own a VPS server running CentOS with Cpanel WHM where no one can watch videos i post on any apple product.
The file plays fine on iphones when watching it on that website. BUT if i download that mp4 file and upload it to my own server, anyone with any iphone cant watch that video on my own server. I do now modify the file in any way. It plays fine on a PC or android phone / table but not Ipad and iphone...
Here is an example of hosting the above file on my server and linking it externally on my server. [URL] ....
I have a apache server, and i'd love to find a way to be able to upload files to my server, allowing me to view the files on my server or in a folder, allowing me to download these files, edit them and re-upload them, replacing them such as files like word documents. I want it to be web-based as i'll be using it for school work, so i can upload them.
I very much like the "readme.txt" that Apache appends to the directory listings. That is, when a browser GETs a directory, the text in that file is put underneath the list of files therein.
Apache httpd Users mailing list, but nobody there has responded in several days. I'm using mod_alias to map URLs to directories that are outside of Apache's DocumentRoot. However, it seems that .htaccess files are being ignored in these directories.