Apache :: How To Access Linux Environment Variables
Mar 7, 2014I am developing a php web application using Apache on CentOS6. I have set a custom environment variable in CentOS on command line by using: export test_var=3
View 1 RepliesI am developing a php web application using Apache on CentOS6. I have set a custom environment variable in CentOS on command line by using: export test_var=3
View 1 RepliesApache (2.2) logs. How can i log the environment variables? (pls do not send me link to manpages - i have it - at least not at this point).I added in apache.conf to the LogFormat combined line for test purposes one environment variable which is valid for sure....
View 1 Replies View RelatedI was trying to get the OCI8 and PDO_OCI extensions of PHP to work with Apache 2.4 and one of the things that needed to be done was to add a couple of variables to the Apache environment, but when I added these:
ORACLE_HOME="/some/path"
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ORACLE_HOME/lib"
Apache took ORACLE_HOME fine, but LD_LIBRARY_PATH never took the values of the variables, I had to put the absolute value of them in order for it to take it.
How I can get Apache to take variables?
This is on Linux.
I'm trying to rewrite the urls across a site I'm developing, which pass get variables like the following:
localhost/link/link1/page.php?id=12
would look like:
localhost/page/12
The first link in the htaccess file works fine, but the following ones don't (whatever the order, the first one works). I'm attaching a snippet of the file here:
# http://localhost/html/content_quiz/quiz-results.php?quizid={number}# to# http://localhost/results/quiz/{number}RewriteRule ^results/quiz/([0-9]+)/?$ /html/content_quiz/quiz-results.php?quizid=$2 [NC,L]# http://localhost/html/content_pages/results.php# to# http://localhost/resultsRewriteRule ^results/?$ /html/content_pages/results.php [NC,L]# http://localhost/html/content_quiz/grade.php?quizid={number}# to# http://localhost/quiz/{number}/gradeRewriteRule ^quiz/([0-9]+)/grade/?$ /html/content_quiz/grade.php?quizid=$3 [NC,L]
I have apache, php, and mysql setup on CentOS 4.4. I have phpMyAdmin running perfectly in a folder in /var/www/html/phpMyAdmin. I can access phpMyAdmin and use it perfectly. I downloaded Cacti which is a server monitoring application written in php, nothing special. I untar the file and it creates a folder, I simply do a mv command from /home/sys/cacti to /etc/www/html/cacti. Then when I open my browser and attempt to access: [url]I am getting a Access Denied error. It makes no sense though, I have verified the permissions of the files and folders, all good.
The group owner and owner are root, the files are all -rw-r--r-- and the folders are drwxr-xr-x.
I need to disable apache access logs. I commented out the access log path in /etc/httpd/conf/httpd.conf and restarted the server but it's still logging access.
View 3 Replies View RelatedDoes the apache virtualhost environment lower the web or apache server's security? virtualhost has no security issues.
View 3 Replies View Relatedi have a high end linux server, low load. i'm looking for ideas as to how i can get a windows 2003 machine hosted up onto it (i have a license already) on one of the machine's dedicated IPs, and set it up to host ASP based websites with MS access (have the license already too). Any tutorials or suggestions how this can be set up?
View 3 Replies View RelatedI am trying to add new programs to the CHROOTED environment via this post: URL....I downloaded the following file URL...., but it has errors. After adding execute permissions, the linux file will not run (errors posted below). I believe there is invalid formatting in the document. I have tried to correct it myself by removing unnecessary characters, but I am unable to get it working.update the file or attach a new copy to this message?
: command not found line 1:
: command not found line 3:
): No such file or directorywarning: setlocale: LC_ALL: cannot change locale (POSIX
): No such file or directorywarning: setlocale: LC_ALL: cannot change locale (POSIX
: command not found line 6:
./chroot_update.sh: line 14: syntax error near unexpected token `elif'
'/chroot_update.sh: line 14: `elif [ -f /etc/debian_version ]; then
Tested with my own comilations as well as the Panda-packages:
- zend opcache configured in php 5.5 and 5.6
- php version assigned to test domains
php-info:
- cache active and running
real-life:
- site loads "normally" on initial load
- cache kicks in on reload - perfect
- 15 seconds later: cache is empty
bottom line: when then php-cgi process ends, the cache is killed too.
Why does it happened? How do I keep the cache persistent? Is it due to cgi/fcgi and fpm would solve it?
In plesk9 my customers had the option to send daily usage reports by e-mail. Only certain clients like this option. Using plesk11 I cannot find this option if I log in as a client. Has this feature been removed? And if so, can the administrator enable this option only for 1 or 2 clients?
View 2 Replies View RelatedI'm Running Plesk 12 latest version. I've been partially followed that instructions to add php5 to a chrooted environment with success : [URL] .....
Code:
bash-4.3$ php --version
PHP 5.5.9-1ubuntu4.5 (cli) (built: Oct 29 2014 11:59:10)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
This is how i did it, as root user :
Code:
./chroot_update.sh --add /usr/lib/php5
mkdir /var/www/vhosts/chroot/usr/share
cp -a /usr/share/zoneinfo /var/www/vhosts/chroot/usr/share
php -i | grep extension_dir
# returns : /usr/lib/php5/20121212/
[Code] .....
how can i change mysql variables in dedicated server?
WHM 10.8.0 cPanel 10.9.0-R57
CentOS 4.4 i686 - WHM X v3.1.0
I have an external redirect to internal rewrite rule that maps multiple URL parameter keys with their associated values...
View 1 Replies View RelatedAs per subject, I have a cpanel server and lately there is something seems wrong with my apache access logs.
/usr/local/apache/logs/access_log
The problem is the log did not recorded website being accessed in details
Quote:
218.111.202.105 - - [24/May/2008:22:53:37 +0800] "-" 408 -
127.0.0.1 - - [24/May/2008:22:55:01 +0800] "GET /whm-server-status HTTP/1.0" 200 31811
74.53.197.2 - - [24/May/2008:22:55:17 +0800] "-" 408 -
74.53.197.2 - - [24/May/2008:22:55:23 +0800] "-" 408 -
219.93.152.12 - - [24/May/2008:22:56:34 +0800] "-" 408 -
207.234.129.249 - - [24/May/2008:22:56:42 +0800] "-" 408 -
203.130.242.48 - - [24/May/2008:22:56:56 +0800] "-" 408 -
203.130.242.48 - - [24/May/2008:22:57:01 +0800] "-" 408 -
76.184.65.88 - - [24/May/2008:22:58:07 +0800] "t&rls=org.mozilla:en-USfficial&client=firefox-a" 501 -
127.0.0.1 - - [24/May/2008:23:00:01 +0800] "GET /whm-server-status HTTP/1.0" 200 32935
127.0.0.1 - - [24/May/2008:23:01:36 +0800] "GET / HTTP/1.0" 200 3473
58.186.201.58 - - [24/May/2008:23:02:22 +0800] "-" 408 -
203.130.242.48 - - [24/May/2008:23:04:11 +0800] "-" 408 -
203.130.242.48 - - [24/May/2008:23:04:15 +0800] "-" 408 -
127.0.0.1 - - [24/May/2008:23:05:01 +0800] "GET /whm-server-status HTTP/1.0" 200 32548
72.29.95.45 - - [24/May/2008:23:06:13 +0800] "-" 408 -
72.29.95.45 - - [24/May/2008:23:06:13 +0800] "-" 408 -
195.82.99.126 - - [24/May/2008:23:06:43 +0800] "-" 408 -
195.82.99.126 - - [24/May/2008:23:06:49 +0800] "-" 408 -
195.82.99.126 - - [24/May/2008:23:06:54 +0800] "-" 408 -
74.53.197.2 - - [24/May/2008:23:08:16 +0800] "-" 408 -
127.0.0.1 - - [24/May/2008:23:10:01 +0800] "GET /whm-server-status HTTP/1.0" 200 31890
127.0.0.1 - - [24/May/2008:23:10:18 +0800] "GET / HTTP/1.0" 200 3473
208.101.51.84 - - [24/May/2008:23:10:46 +0800] "-" 408 -
62.193.196.250 - - [24/May/2008:23:13:18 +0800] "-" 408 -
62.193.196.250 - - [24/May/2008:23:13:24 +0800] "-" 408 -
62.193.196.250 - - [24/May/2008:23:13:29 +0800] "-" 408 -
127.0.0.1 - - [24/May/2008:23:15:05 +0800] "GET /whm-server-status HTTP/1.0" 200 33145
127.0.0.1 - - [24/May/2008:23:19:08 +0800] "GET / HTTP/1.0" 200 3473
127.0.0.1 - - [24/May/2008:23:20:02 +0800] "GET /whm-server-status HTTP/1.0" 200 32720
67.15.205.17 - - [24/May/2008:23:22:26 +0800] "-" 408 -
127.0.0.1 - - [24/May/2008:23:25:16 +0800] "GET /whm-server-status HTTP/1.0" 200 31203
209.25.195.74 - - [24/May/2008:23:26:21 +0800] "-" 408 -
209.25.195.74 - - [24/May/2008:23:26:24 +0800] "-" 408 -
209.25.195.74 - - [24/May/2008:23:26:27 +0800] "-" 408 -
209.25.195.74 - - [24/May/2008:23:26:29 +0800] "-" 408 -
209.25.195.74 - - [24/May/2008:23:26:33 +0800] "-" 408 -
209.25.195.74 - - [24/May/2008:23:26:36 +0800] "-" 408 -
127.0.0.1 - - [24/May/2008:23:28:05 +0800] "GET / HTTP/1.0" 200 3473
My old logs /usr/local/apache_bacup/logs/access_log record them fine
Quote:
80.191.80.84 - - [18/Jul/2007:04:21:13 +0800] "GET /ss-xs/?action-spacelist-uid-356-type-blog-starttime-1181520000-endtime-1$
80.191.80.84 - - [18/Jul/2007:04:21:53 +0800] "GET /forum/archiver/tid-1303.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:22:18 +0800] "GET /forum/archiver/tid-819.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:22:37 +0800] "GET /ss-xs/?17/spacelist-blog.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:22:44 +0800] "GET /ss-xs/?viewthread-1745.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:23:21 +0800] "GET /forum/archiver/tid-2074.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:23:29 +0800] "GET /forum/forumdisplay.php?fid=35 HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:23:58 +0800] "GET /forum/archiver/tid-998.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:24:02 +0800] "GET /forum/archiver/tid-784.html HTTP/1.1" 404 -
127.0.0.1 - - [18/Jul/2007:04:25:01 +0800] "GET /whm-server-status HTTP/1.0" 200 21150
80.191.80.84 - - [18/Jul/2007:04:25:01 +0800] "GET /forum/archiver/tid-2100-page-1.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:25:10 +0800] "GET /forum/archiver/tid-1211-page-3.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:25:37 +0800] "GET /forum/archiver/tid-834.html HTTP/1.1" 404 -
127.0.0.1 - - [18/Jul/2007:04:25:40 +0800] "GET / HTTP/1.0" 200 2860
80.191.80.84 - - [18/Jul/2007:04:26:25 +0800] "GET /forum/archiver/tid-623.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:26:41 +0800] "GET /forum/archiver/tid-25.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:27:18 +0800] "GET /ss-xs/?10/viewspace-18 HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:27:44 +0800] "GET /forum/archiver/tid-802-page-2.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:27:48 +0800] "GET /forum/archiver/tid-1802-page-7.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:28:15 +0800] "GET /forum/archiver/tid-1569-page-2.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:28:31 +0800] "GET /forum/archiver/tid-1133.html HTTP/1.1" 404 -
127.0.0.1 - - [18/Jul/2007:04:30:02 +0800] "GET /whm-server-status HTTP/1.0" 200 21041
80.191.80.84 - - [18/Jul/2007:04:30:19 +0800] "GET /forum/archiver/tid-462-page-1.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:30:34 +0800] "GET /forum/archiver/tid-1900.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:30:42 +0800] "GET /ss-xs?693 HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:30:46 +0800] "GET /forum/archiver/tid-1501-page-2.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:31:48 +0800] "GET /forum/archiver/tid-2055.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:31:58 +0800] "GET /forum/archiver/tid-2050-page-2.html HTTP/1.1" 404 -
127.0.0.1 - - [18/Jul/2007:04:34:04 +0800] "GET / HTTP/1.0" 200 2860
80.191.80.84 - - [18/Jul/2007:04:34:32 +0800] "GET /forum/archiver/tid-2019.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:34:53 +0800] "GET /forum/archiver/tid-744.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:34:59 +0800] "GET /forum/archiver/tid-2135.html HTTP/1.1" 404 -
127.0.0.1 - - [18/Jul/2007:04:35:01 +0800] "GET /whm-server-status HTTP/1.0" 200 21102
80.191.80.84 - - [18/Jul/2007:04:35:11 +0800] "GET /ss-xs/archiver/ HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:36:38 +0800] "GET /forum/archiver/tid-781-page-2.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:37:04 +0800] "GET /forum/archiver/tid-1216.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:38:09 +0800] "GET /ss-xs/?viewthread-1879.html HTTP/1.1" 404 -
80.191.80.84 - - [18/Jul/2007:04:38:29 +0800] "GET /forum/archiver/tid-275.html HTTP/1.1" 404 -
127.0.0.1 - - [18/Jul/2007:04:40:02 +0800] "GET /whm-server-status HTTP/1.0" 200 21191
how do I make my apache to log the access log in details again?
Can't access apache update in WHM I get an http 500 error page.
View 4 Replies View RelatedI'm trying to set up Apache on CentOS 4. I'm using Apache 2.0 and it can't seem to access anything outside of the /var/www directory - it gives an Error 403.
I thought this would be down to SELinux but this is disabled. I've run the following command on the directory but with no luck:
Code:
chown apache /home/jmaskell -R
I m newbie to apache server. I have created a web site using apache server with theURL... tutorial. I m able to access my web site on my ip address bt unable to access it using other ip of linux system. I m CentOS user. I can ping that ip with my ip. I have edited files as described in the tutorial.
View 1 Replies View RelatedTrying to access my website, which is running on my PC on Apache XAMPP, from another PC by typing:
http://IP:80 and I get a simple page not found error.
Firewall on router and PC are disabled.
Port forwarding is done.
Apache is running on port 80 and port 444
Added to httpd-xampp.conf:
I can't reach my website, I get a "corrupted content" error message in the browser.Looking into apache (version 2.4.7), I get
Code:
~$ apachectl -S
AH00526: Syntax error on line 22 of /etc/apache2/sites-enabled/000-default.conf:
SSLCertificateKeyFile: file '/etc/ssl/private/owncloud.key' does not exist or is empty
Action '-S' failed.
However, I double checked that the file is in the appropriate location and does contain the key, so maybe apache has no permission. afaik, it doesn't run as root all the time - or only for a short time?
permissions for the key file are as follows:
Code:
~$ sudo ls -l /etc/ssl/private/owncloud.key
-rw-r--r-- 1 root ben 1704 Sep 28 04:01 /etc/ssl/private/owncloud.key
, where ben is my normal user.
It was suggested to me on the httpd IRC channel that maybe apparmor was doing something wrong, but I don't know how to investigate that.
I'm getting an error when I try to allow apache access a mount nfs folder...
View 4 Replies View RelatedI have installed Apache 2.4.3, and PHP 5.4.5 64-bit, and I have installed PostgreSQL 9.2 64-bits under my new system windows 7 64 bits. Apache and PHP could work nicely, and PostgreSQL run fine too. However, PHP couldn't access the PostgreSQL. pg_connect(), and followed by echo select version(), didn't give any error. When PostgreSQL module was not loaded (because my php dir was d:php, but inside httpd.conf i type D:/PHP), I got message saying something like "undefined pg_connect()." I fixed it, but select version() or any other echo after pg_connect() didn't give any output.
View 5 Replies View Relatedi signed up for vps from vps.me and i got ssh credential i logged in ssh using token2shell but when i put my server ip "10.223.1.157" in google chorome but then it says unable to find even i am not able to access ftp through filezilla also
View 3 Replies View RelatedI have XAMPP server which works fine. When I wanted to load webpages through my lan network it said I need to edit httpd-xampp.conf. When I try to load from internet there is no connection at all. I changed httpd-xampp.conf from this
Code :
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
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 recently installed Apache/2.0.64(win32)on my Windows 7 machine and am having a problem with external access. The installation appears to be good as it shows all services running and I can access a basic index.html file through 127.0.0.1
I have ruled out any router or firewall issues and am fairly sure the problem is with the httpd config. But the only changes I've made are to the NameServer and Listen directives, so I'm lost for an answer to the problem.
The NameServer is set to my actual IP address while the Listen one is set to my servers internal IP address, but I have tried switching them around with no success.
The other thing I don't know is if I need to have SQL and myPHP installed just to check basic functionality.
I made the idiotic move of not making a backup of the default configs and now I can't access my http website externally. ssl works fine, but I need http to work too.
View 3 Replies View RelatedI'm looking for how to deny an IP access to my server. Not just a particular site. I have several sites on my server. Do I need to put that denial in each and every .htaccess file? Is there some way I can specify an IP denial to everything anywhere on my server?
View 1 Replies View Related