Apache :: 2.2 To 2.4 Includes No Longer Work For SHTML Files
Oct 23, 2014
I use the Apache server included with Mac OSX as my local development and testing environment for front-end web coding work. On the latest update to Yosemite (10.10), all of my .shtml files stopped processing my include virtual statements (or any SSI statements, for that matter).
I'm not seeing any errors, but the includes just show up like commented out code in the HTML when I view source. I've set up Apache to use a httpd-vhosts.conf for my various local dev servers (project1.local, test.local, etc...) Nothing seems to work.
I have a problem I am tracing on a single virtual host on a dedicated server running whm/cpanel and apache 2.2.9. I am tracking down a 500 internal server error on a group of cgi scripts (that works on another virtual host on the same server). Apache was installed with easy apache included with whm.
My problem has been narrowed to the cgi-bin itself. To test I created a simple hello world script that runs in the web directory of this particular virtual host, but gives a 500 error when run in the cgi-bin.
Looking at the configs for apache, boy is this a mess, I have a group of configs in /etc/httpd/conf and another group in /usr/local/apache/conf. When I restarted apache it seems to be reading the /usr/local/apache ones (even though they both look the same in /etc/httpd also.
On the httpd.conf file, the virtual hosts are listed there with all the paths I need. But above each one it gives a warning:
DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
The include is listed on the virtual host as: Include "/usr/local/apache/conf/userdata/domain/domain.com/*.conf" on the one that works. And in the following format: Include "/usr/local/apache/conf/userdata/std/2/domain2/domain2.com/*.conf" on the one that doesn't.
The funny thing is that /usr/local/apache/conf/userdata does not exist.
This makes me truly appreciate my DirectAdmin server. Anyone have ideas where to look for adjusting apache server settings on this type of setup?
And is this complicated setup due to easy apache or cPanel itself?
The "/etc/php.ini" file seems reasonable and the session file path seems correct: session.save_path = "/var/lib/php/session"
But the session files never get deleted automatically. The session folder fills up quickly and I have been deleting session files manually while trying to resolve the problem. How can I verify that the default Plesk cron jobs are set up and running properly?
I am having some trouble with getting 'include' working. I have a new dedicated server running Apache 2.0.63 and PHP 5.2.6. Local includes on the same domain are running ok, but remote includes are throwing a problem. On the many sites we plan to host on this servber we use a central 'webmaster' page called as an include from a specific site (also on the same server).
I need to edit the PHP.ini and /or recompile the PHP with the appropriate modules to do one of the following...
1 (ideally) - allow includes from any site that is held on this dedicated server
Having some issues here, I used Apache Update to install WHMCS as I didn't have Curl installed. Well had some issues using the username and password as it couldn't connect to the database, my modernbill and phpnuke scripts still work but some other scripts like joomla, some shopping cart software, and other MYSQL scripts are not working.
I've run test scripts to see if I can connect to the database, got the following error with the PHP test script
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'data_invoice'@'localhost' (using password: YES) in /home/data/public_html/test2.php on line 4 I cannot connect to the database because:Access denied for user 'data_invoice'@'localhost' (using password: YES)
Also attempted it in SSH and getting a similar error that access is denied. Username and password are correct. I believe I upgraded PHP which my guess is what caused this. I've searched the forum for a few solutions and I had the problem in the past which I fixed it, but it's been a while.
I have a dedicated server, on this server I have only 2 website.
I created an account before and that account work correctly.
now I created a new account and when I trying to run a simple php file show me "Internal Server Error". I can view html files and I haven't .htaccess file .
Server Inofrmation: CentOS , cPanel , Apache 2, PHP 5
I'm building website for big number of visitors and I'd like to know what is the best way to do such a website.
1. PHP/MySQL. Pages are created by query (on the fly). 2. HTML. Pages created and placed on server's HDD as plain .html files. 3. SHTML. Pages are created by query (on the fly), but from 3 HTML parts (one header for all files, unique body, one bottom for all files). So, I can save some HDD space.
I'm looking for some kind of benchmark. I'd like to know what is CPU load and memory usage difference between this methods.
OS is OpenSuse 13.1.Yast shows the installed version of Apache2 as 2.4.6-6.23.1..I created my own CA, and used that to create a server certificate. The CA crtificate (in PEM format), and the server key and certificate have been placed in the appropriate directories in /etc/apache2 (the key in ssl.key and the certificates in ssl.crt).
When I check the status, after restarting apache, I see an error claiming that socache_shmcb_module is not installed and that it is ignored. This is, of course wrong, as I included that module in /etc/sysconfig/apache2, and the appropriate LoadModule statement in the Loadmodule.conf file (with the proper full path - /usr/lib64/apache2). This error is the only error I see on the server.
(I am using apache 2.2.25).I have this "HTML5 and CSS all in one for dummies" Book. And it tells me I have to configure the .conf file to make apache work with PHP.
At this point I have only edited the Document root folder. The book tells me to find a Loadmodule with an # with a mention of PHP (I'll put the text of the book at the end) and to add an "addtype" statement. If have found neither and when I add the manually the server doesnt work.how can I make PHP work? Also, I have noticed that the Apache commands in CMD don't work. I am running windows 8.1. URL....
On my website at www.jamescobban.net I have a directory which contains an ancient copy of my old static implementation of the site. It is there just in case someone has saved a old URL. However the data in that directory is several years out of date, so I would like to redirect the old static URLs to the equivalent dynamic URLs. For example: URLs.....
I wasn't warned that the <Directory> in the Apache conf file has to specify AllowOverride All whereas the default that is created when I install Ubuntu is AllowOverride None.I wasn't warned that I have to enable the mod_rewrite using a2enmod or else the rewrite commands are rejected.I am testing this on my private copy of the web-site where I can fiddle with options like that in the config file, but when I migrate this to my public server I do not have that privilege, so I want to try setting up the URL rewriting in .htaccess.
I have my postfix server configured to allow me to send email without authentication whenever my ip matches a value in my config. Only problem is, i have it open to accept anyone in my subnet, and i'm kind of weary of letting anyone in this area send mail through it.
I have a script on my server that gets my ip address whenever i send an http-based request to my winamp now playing script. When it gets my ip address, it updates a file called ip.txt with my ip address. What i'm trying to do is config my postfix main.cf file to grab the ip from ip.txt, and add it onto the mynetworks variable. Then when i try to send the email, i want it to recognize me, and let me send the email.
Apache is currently working fine using an alias for one webserver, weewx. I had a heck of a time configuring the alias though, most configurations would result in a 404 error.
I'm trying to get it working with another webserver, IOG. And I'm again getting 404 errors...
Currently my IOG.conf file looks like this:
Code: Alias /IOG /home/Storage/iog <Directory /home/Storage/iog> Options Indexes AllowOverride None Require all granted </Directory>
/home/Storage/iog is good, it's the exact path and is readable/writable by all users.
Options Indexes is included because IOG does not generate an index.html.
AllowOverride None is included because I'm not using .htaccess files, and because it worked for the weewx configuration file.
Require all granted is used because I'm not serving this external to my LAN and would like all LAN machines to have access.
My (working) weewx configuration file:
Code: Alias /weewx/ "/home/Storage/weewx/" <Directory "/home/Storage/weewx/"> Options Indexes Includes FollowSymlinks AllowOverride None Require all granted </Directory>
Of course I tried that first, modifying the paths to IOG, and got a 404 error.
I make sure to reload Apache each time I make a change to the configuration file.
We currently migrating over from SunOne to HTTP Server. Flash files work fine on SunOne but not on the HTTP Server.When you go to run launch.html another window opens but the swf doesnt start playing.Both .flv (video/x-flv) and .swf application/x-shockwave-flash are in the mime.types
Launch.html file ##################################################### Include /opt/IBM/WebSphere/HTTPServer/conf/httpd.conf ##################################################### # #Listen IP address and Port Number
One site just linked to my website with incorrect URL as URL.. want to correct this by redirecting the URL to URL.... Therefore, I add the following line in my .htaccess, as follows: Redirect 301 /aor/%e2%80%9d URL...
However, this does not work. When I input URL... in Firefox or IE, the browser still said the page not found(404) error.
I has Parallels Ples 11.X with Cent OS 6.5 and yesterday i tried to upgrade to PLESK 12.0.18.
Now, I can't start the apache module because it´s impossible to create the config file
The issue is:
Details: [2014-09-17 19:46:27] ERR [util_exec] proc_close() failed [2014-09-17 19:46:34] ERR [panel] Apache config (14109759800.30476400) generation failed: Template_Exception: Can not restart web server: Service /etc/init.d/httpd failed to start Service /etc/init.d/httpd failed to start
file: /usr/local/psa/admin/plib/Service/Driver/Web/Server/Apache.php line: 104 code: 0 Can not restart web server: Service /etc/init.d/httpd failed to start Service /etc/init.d/httpd failed to start
I try with cp the certifies and writing a new private key but it didn't work.
We upgraded 7 servers from our network from PHP 4.4.7 to PHP 5.2.5, and Apache 1.3.3.9 to Apache 2.0.61. In only one of this servers we found problems with includes...
Include example that works:
Code: <? include("http://www.google.com"); ?> This doesnt work:
Code: <? include("path/file.php"); ?> And path/file.php does exist, also log error from apache doesnt even show a line .
allow_url_fopen was replaced by allow_url_include and it's set to On.
Im using PHP 5.2.5, Apache 2.0.61, cPanel and RHES 4.