I want to change httpd log location on centos
the location where is install dont have a good memory
so i want to move it to /home/httpdlog/
Thanks for any helps
you can use "ErrorLog" and "CustomLog" directive (in httpd.conf file) and change the directory
please check this link :
https://serverfault.com/questions/875697/changing-apache-2-4-xs-log-files-directory-on-centos-7
I am doing installation of tactic 4.5 on centos 7.
i am following
http://community.southpawtech.com/tactic-sys-admin_sys-admin_install-tactic-centos-6.2.html
but in the end when i am trying to access tactic through web
i am getting this error:
The requested URL /tactic was not found on this server.
you need to configure apache properly to fix this.
Copy tactic configuration file in /etc/httpd/conf.d folder
cp /opt/tactic/tactic_data/config/tactic.conf /etc/httpd/conf.d
open httpd.conf file and add Include conf.d/*.conf in the end
systemctl restart httpd.service
I have just installed Ubuntu & starting with LAMP.
I installed it & it was working just fine till I installed uTorrent. Then after localhost was not opening & I tried with stopping apache & again restarting with it.
I used - sudo service apache2 restart
Now this error is coming - Could not open configuration file /etc/apache2/apache2.conf: No such file or directory
I checked there, there is no such file with this name.
Installed uTorrent is running on 8080 port...can it be problem ?
I really don't know what to do.
Is there an /etc/apache2/httpd.conf ?
If there is, have a look inside it and see what is being included i.e look for anything along the lines of:
Include /etc/apache2/apache2.conf
Basically there error is being thrown because of an incorrect pathname in a Include directive in a conf file
I'm using Ubuntu Natty. I recently installed NGINX 1.0.6 and PHP 5.3.8 (with --enable-fpm) from source. Everything went ok and I tested it with an info.php page with phpinfo().
I then installed APC and Memcache using PECL i.e. pecl install apc, etc. That seemed to go ok as well.
However, when I edit my php.ini file and add the extension_dir and extension modules for both APC and Memcache, I get the following when I restart PHP.
Starting php-fpm PHP Warning: Module 'apc' already loaded in Unknown on line 0
<br />
<b>Warning</b>: Module 'apc' already loaded in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: Module 'memcache' already loaded in Unknown on line 0
<br />
<b>Warning</b>: Module 'memcache' already loaded in <b>Unknown</b> on line <b>0</b><br />
done
When I open the info.php file to check what loaded, everything seems ok i.e. I see APC and Memcache references in the information.
But when I uncomment the extensions i.e. ;extension=apc.so and ;extension=memcache.so, there are no errors, but the APC and Memcache listings in PHPinfo no longer appear.
I'm not sure how these extensions are being loaded twice and from where. I'd appreciate some guidance.
Thanks in advance.
EDIT
I'm using PHP-FPM and using lsof -i -P it appears that I have multiple pools of PHP-FPM running. Could this be part of the problem why I am seeing this error?! Is there a way to fix this?!
When you run: php --ini, do you get this:
Configuration File (php.ini) Path: /etc/php5
Loaded Configuration File: /etc/php5/php.ini
Scan for additional .ini files in: /etc/php5
Additional .ini files parsed: /etc/php5/php.ini
If yes, you should re-run your configure script so not to specify the additional ini file directory.
The content of .htaccess is:
php_value upload_max_filesize 64M
Works on localhost, screws up every hosting server I upload it to.
The error.log says: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
Is there another way to change the upload_max_filesize?
If php_value is not recognized as a valid command, it may be because PHP is not installed as an Apache module. Create a php file with the following contents:
<?php phpinfo();
Run the file to show your PHP configuration. Search the page (Ctr+F) for "mod_php". If you don't find it anywhere, this explains your problem.
If you have access to php.ini, you may be able to fix your problem by editing that file instead. At the phpinfo page, look at the value under Loaded Configuration File for the location of the file to edit. On Linux, it will be something such as /usr/local/lib/php.ini
Open the ini file (it's just a text file) and look for the setting you want to change. If it's not present, just add a line and set it as desired: upload_max_filesize=64M
Save the file and restart the Apache server.
If you don't want to remove the php_flag command in .htaccess but want to avoid the error, wrap the command as follows:
<IfModule mod_php5.c>
php_flag display_errors 0
php_flag display_startup_errors 0
</IfModule>
If you're using PHP7, use <IfModule mod_php7.c>
For other readers with the same problem and access to the server, this could also be caused by a misconfiguration of PHP as a module of apache. You can fix it reinstalling the module (or configuring the route to libphp.so by yourself in php.ini).
Have in mind that purge will remove the configuration of the packages which usually is nothing to worry, but you are warned just in case.
sudo apt-get purge libapache2-mod-php libapache2-mod-php7.2
sudo apt-get install libapache2-mod-php
The problem was the hosting provider, they only allow changing this via php.ini
It seems like the php module is not loaded. Make sure, it is installed with
sudo apt-get install libapache2-mod-php
and check if it is enabled in apache with
ll /etc/apache2/mods-enabled/*php*
if it is installed but not enabled, enable it (depending on your php-version) e.g. for PHP 8.0 with
sudo a2enmod php8.0.load
and restart apache
sudo apache2ctl graceful
I too was receiving a 500 internal server error. My error log showed:
Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
I tried updating upload_max_filesize as suggested but it didn't work for me. The last line of my .htaccess file had:
php_value max_execution_time 120
I removed that line and the site resolved perfectly.
Create .user.ini file
Add the line upload_max_filesize="5M"