I have created a server using the Apache httpd, mysql and PHP. I have installed phpmyadmin. but if I try to access through my browser I am getting a blank page instead of login. what I can do for this?
I can't comment as my reputation isn't high enough on here.
However, if you post the steps you've already implemented I'm sure somebody can help. As it is you've given no helpful information.
A few things to check:
Have you checked your apache error logs?
/var/log/httpd/error_log
Have you created a 'Directory' directive to allow permission?
<Directory "/usr/share/phpmyadmin">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
Have you added an alias in your httpd.conf or virtual host configuration to enable access?
Alias /phpmyadmin /usr/share/phpmyadmin
You can enable php logging using the instruction mentioned here:- enter link description here
By checking the php log you can make sure whether it's been caused by high memory requirement.
Also make sure the permissions & ownerships of the phpmyadmin files are correct.
Related
I’m new to SSO and trying to set up simplesamlphp on an existing Windows, PHP/MySQL server. I have installed the latest version of simplesamlphp, and followed the configuration instructions on the simplesaml.org site, including setting up the VirtualHost in the Apache config file, setting the basurlpath, auth.password, secretsalt and technical contact info in the simplesaml config file. At this point, I am able to load the frontpage_federation.php page, but when I try to log in as administrator, the process times out. I get an error message saying the site can’t be reached, and the site took too long to respond. Has anyone experienced this before & can you give me some ideas on what mistake(s) I am making in my configuration?
httpd.conf
<VirtualHost *>
ServerName service.example.corp:8080
DocumentRoot G:/localhost/simplesamlphp/www/service.example.corp
SetEnv SIMPLESAMLPHP_CONFIG_DIR G:/localhost/simplesamlphp/config
Alias /simplesaml G:/localhost/simplesamlphp/www
<Directory G:/localhost/simplesamlphp/www>
Require all granted
</Directory>
</VirtualHost>
config.php
'baseurlpath' => 'https://service.example.corp:8080/simplesaml/',
I'm guessing that something goes wrong in redirecting you after you've entered credentials and that you end up on a URL without that port number. Your browser's web development toolbar, or the excellent SAML Tracer browser extension, should be able to confirm what requests are sent to what exact URLs. That will likely help to pinpoint your problem.
I just got a VPS and it's running CentOS 6.8 with WHM 58.0. I really don't want the WHM, I only want to add one site to the server. So I just installed an FTP server and uploaded the files to the Apache root dir at /usr/local/apache/htdocs and gave all files chmod 777.
All works good, but when I go to PHP or ajax to PHP I get "403 Forbidden". I suppose the problem is in the http.config but I really have no idea. Here is my http.conf file and I don't have any .htaccess files.
Among other things, you want to make sure that the Linux user that is running Apache has permission to read and execute the PHP files where they are on the server.
This is a good guide for transferring PHP files and setting the permissions using PHP: https://www.digitalocean.com/community/tutorials/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server
There's also a guide here to setting up the server and checking that PHP is set up correctly here, but I assume you have done this already: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
I just replace this
<Directory "/usr/local/apache/htdocs">
Options Includes Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
With this
<Directory "/usr/local/apache/htdocs">
Options Indexes
Order allow,deny
Allow from all </Directory>
I haven't registered any domain for my server.
I might be wrong, but according to my understanding,
the default ip for the server is public.
my server ip is http://166.62.101.242/.
but whenever i ping on that domain, it keeps redirecting to the /usr/local/cpanel/cgi-sys/defaultwebpage.cgi
folder.
I have changed my /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
however it still keeps redirecting to the cpanel page.
what changes do i need to make, so i can access the /var/www folder without registering for a domain?
This redirection is because cPanel uses Block Hosting. You will have to point a domain to the IP Address and tell cPanel to register that domain in your system. I would highly suggest you to get a domain instead of modifying anything with cPanel because if something goes wrong, you may not be able to manage your site. You can get a free domain from freenom.com. If you need further assistance for setting it up, please hit me up and I'll guide you step by step.
It seems there is error in processing .php file in apache.
I have got same problem.
change the ownership of the file.
e.g. if the file name ins info.php
sudo chown nobody:nobody info.php
sudo chmod 644 info.php
Let me know if this help
Also make sure to add .php in
sudo vim /etc/httpd/apache/conf
AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml .php
It is looks that you have VPS with a WHM/cPanel.
There are multiple possibilities to set that.
The most easy way is to add an account and set a new domain...
Or can hack the Apache global configuration WHM -> ApacheConfiguration -> Global Configuration and set a new virtual server in premain. The server should have same external and internal IPs
The other way is to hack the main.conf template and change the httpd configuration.
After, you should run:
/services/rebuildhttpdconf
to rebuild the httpd.conf
Please note that your changes in default httpd.conf will be overwrite everytime the cPanel/WHM will restart, so your solution with modification of default /etc/httpd/conf/httpd.conf it is not OK!
Try with the IP instead...
VirtualHost 166.62.101.242:80
...and clean your browser cache! (or you can try this first).
I had the same behavior and I was going to hit my head to the wall because of that :(. The reason why you are getting this is because the content of /etc/httpd/htdocs/index.html IS
<html><head><META HTTP-EQUIV="refresh" CONTENT="0;URL=/cgi-sys/defaultwebpage.cgi"></head><body></body></html>
It takes 2 days for me to figure this out. If you managed to land your request on your server but the name you are requesting -the IP in our case- is not exist in the apache virtual hosts, the apache is going to response with this file. ;-)
I have a quick question that's driving me insane and would appreciate the assistance.
On a live wordpress setup, how does accessing /wp-config.php from a browser result in a 403 error when you can access all other PHP files fine froma webbrowser? The config.php file has a chmod that permits public read AND there's no mention of it in the corresponding .htaccess.
Just very curious as to how it works. Thanks!
This is server specific, but you could definitely add a rule to the web server configuration to do this. For instance, using Apache, you could do something similar to this:
<Directory /var/web/dir1>
<Files private.html>
Order allow,deny
Deny from all
</Files>
</Directory>
My point here is that there are more ways to configure permissions for files served by a web server than file system permissions.
It should also be noted that if you are not the administrator of the machine running the web server, you may not have access to tweak these settings.
I've edited my httpd.conf, and I'm still getting the error:
"Forbidden. You don't have permission to access / on this servers"
I'm trying to allow everyone to access my WAMP website. I added this into my httpd.conf file:
<Directory />
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
After restarting my WAMP server, I'm still getting the error when I don't access my site from my local machine.
I'm using WAMPServer 2.5 which has Apache 2.4.9.
The section of httpd.conf you changed protects the drive that Apache is installed on and should be set to
<Directory />
AllowOverride none
Require all denied
</Directory>
Now the section of httpd.conf that you need to look for is this one
it starts with
<Directory "c:/wamp/www/">
and inside that section there is a line like this
# onlineoffline tag - don't remove
Require local
To allow access from any ip address change it to this
# onlineoffline tag - don't remove
Require all granted
You should be able to do this by using the wampmanager menus like so:
wampmanager -> Put Online
However if you have changed the section of code around the # onlineoffline tag - don't remove line, the automatic edit done by using the menus may not work, so its probably easier to do it manually, or at least check that the menu controlled edit worked properly.
Change DirectoryRoot to <Directory c:/wamp/www>
Make sure the ownership and permissions of C:\wamp\www
User: yourusername
Permission: Allow - Read and execute and Read permissions
you should try this:
Edit C:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf (apache2.4.9 might be different, depends on your apache version)
Scroll all the way down until you find Deny from all and change that too Allow from all
EDIT Answer to #Bonner
Your permissions are still wrong
If they still wrong, please provide the right permission, instead of just point it out. Based on "my poor knowledge" I think the permission are fine.
you have failed to ask whether the WAMP tray icon is appearing or not
Based on question description
After restarting my WAMP server,
I assumed WAMP tray appears.
If you make changes to the httpd-vhosts.conf they will be overwritten by the tray icon software when an option is changed
False. WAMP Control Panel let you edit configuration files like my.ini, httpd.conf, php.ini, etc. However, you can't edit httpd-vhosts.conf from WAMP Control Panel.