Hi,
So I’m having some issues with a subdomain which I can’t fix after reading a lot through the internet.
I’m trying to set up an api subdomain which purpose is to respond http requests, so my index file is just a php that redirects to the web (which is working fine).
I have an .htaccess with redirects things like api.domain.tld/createuser to api.domain.tld/api/user/create.php, but it is not working (I’m getting 404 error code). If I do the http request with the long url it works fine.
Also, just in the case it is useful, I’ve added an info.php to check phpinfo() and I’m getting a 500 error code.
Can anyone help me out? Thanks
NOTE: I’ve already checked:
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Well, I’ve finally found the problem. The file /var/run/mysqld/mysql.sock file was missing, I really don’t know how or why but I returned to a old snapshot and did things over it and now everything seems to work.
Thanks @MDS for the help, some things were useful for me.
Hi,
My apache2.conf file contains exactly this:
I’ve got several Virtual Host files: 000-default.conf, domain.tld.conf, sub1.domain.tld.conf, sub2.domain.tld.conf and in all of them I’ve got:
Where url can be html, domain.tld, sub1.domain.tld or sub2.domain.tld.
Also I’ve changed the .htaccess as you told me, and stills the same >.<
Thanks for the help
Make sure that you have AllowOverride set to All in your apache virtual host file.
And change .htaccess to