SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
good day everyone.. just wanna ask you guys something.. yesterday my apache is working fine and i even tested it with a page having php_info(); function and it works.. however when i tried adding a virtual host in my /etc/httpd/extra/httpd-vhost it didnt worked.. then i tried to restart my apache and it returned error saying this
Code:
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
i fixed it by adding a ServerName on my /etc/httpd/httpd.conf and restart my apache but it still displays blank page and now even if i use localhost its still blank.. i tried running a page having php_info(); function but its also blank.. how do i fix it?
good day everyone.. just wanna ask you guys something.. yesterday my apache is working fine and i even tested it with a page having php_info(); function and it works.. however when i tried adding a virtual host in my /etc/httpd/extra/httpd-vhost it didnt worked.. then i tried to restart my apache and it returned error saying this
Code:
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
i fixed it by adding a ServerName on my /etc/httpd/httpd.conf and restart my apache but it still displays blank page and now even if i use localhost its still blank.. i tried running a page having php_info(); function but its also blank.. how do i fix it?
and does
Code:
etc/rc.d/rc.httpd restart
different from
Code:
usr/sbin/apachectl restart
in your httpd.conf you will need some lines that include and load php module.
this is configuration taken from a centos box, but i cant imagine slackware being that different..
with centos and php, the php.conf file is located in conf.d and everything in conf.d is included in the httpd.conf file.
hope this makes sense to you...
i had this problem too. in order to set up virtual hosts in apache you need to configure localhost as the default virtual host - what apache will serve if no other hosts match.
here are the relevant parts from my extra/httpd-vhosts.conf file:
Code:
<Directory "/var/www/vhosts">
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
<Directory "/var/www/htdocs">
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
DocumentRoot /var/www/htdocs
ServerName localhost
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log common
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/vhosts/<removed>
ServerName <removed>
ServerAlias <removed>
ErrorLog /var/log/httpd/<removed>
CustomLog /var/log/httpd/<removed> common
</VirtualHost>
this is configuration taken from a centos box, but i cant imagine slackware being that different..
with centos and php, the php.conf file is located in conf.d and everything in conf.d is included in the httpd.conf file.
hope this makes sense to you...
yesterday my apache works fine w/o those codes.. may i ask why is that possible?
i had this problem too. in order to set up virtual hosts in apache you need to configure localhost as the default virtual host - what apache will serve if no other hosts match.
here are the relevant parts from my extra/httpd-vhosts.conf file:
Code:
<Directory "/var/www/vhosts">
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
<Directory "/var/www/htdocs">
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
DocumentRoot /var/www/htdocs
ServerName localhost
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log common
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/vhosts/<removed>
ServerName <removed>
ServerAlias <removed>
ErrorLog /var/log/httpd/<removed>
CustomLog /var/log/httpd/<removed> common
</VirtualHost>
tnx m8.. works fine! will give you thnx.. ^^ though i have to omit the second part w/c has this part
Check the Apache access log (/var/log/httpd/access_log). If you have an entry there for the requests you are making, I'd rule out Apache as the source of the problem.
Also check the server log (/var/log/httpd/error_log). Maybe you are having a PHP error that is not being shown due to the error_reporting value. But if log_errors is enabled (that is the name of the property in php.ini, IIRC) you should have the error logged in that file.
Also, what happens if you try...?
- load a static, plain HTML page
- run a PHP file from the command line
Edit: too late, but good that you found a solution :-)
when i restart my rc.httpd it says that /var/www/vhost cannot be deleted coz it doesnt exist.. what this part by the way?
that's because the config i posted is specific to my system, and i have all my vhosts in /var/www/vhosts. you'll have to change it to match your system.
and, no problem glad it helped!
[edit: and the <removed> part is the server name that i'd like to keep private. customize to match your vhost.]
that's because the config i posted is specific to my system, and i have all my vhosts in /var/www/vhosts. you'll have to change it to match your system.
and, no problem glad it helped!
[edit: and the <removed> part is the server name that i'd like to keep private. customize to match your vhost.]
so that second part is used to remove the virtual host? i mean it would delete the file?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.