Greetings to all! Just getting to know PHP. From the very beginning there were a lot of problems. PHP does not have a pre-installed local server. In this regard, many problems have arisen.
Could not install LAMP. on manuals:
http://help.ubuntu.ru/fullcircle/22/web- development_h3
http://linux-user.ru/distributivy-linux/programmy-dlya-linux/lokalnyj-server-lamp-dlya-ubuntu-linux-mint/
http://ubuntovod.ru/instructions/web-server-ubuntu-php-mysql.html Apache shows its default page. Changing, as stated in the articles above, does not work (ie, I change, but the result is zero) for the sudo service apache2 restart
command. The Apache curses and shuts down.
Using sudo apt-get install lamp-server^
mysql flies, so put everything manually. I guess I messed up with an apache, but I don't know where. In sudo gedit /etc/apache2/sites-available/test.com.conf
wrote
ServerName tset.com ServerAlias www.test.com DocumentRoot /home/anton/php/test.com/public
Further
sudo a2ensite test.com sudo /etc/init.d/apache2 reload
writes:
[....] Reloading apache2 configuration (via systemctl): apache2.serviceapache2.service is not active, cannot reload. failed!
I do sudo gedit /etc/hosts
final hosts view:
127.0.0.1 localhost test.com 127.0.1.1 anton-N751JK 127.0.0.1 test.com # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts
default-ssl.conf
did not change
in /home/anton/php/test.com/public
created index.html
with text. I go to test.com
and get: I can not access the site
What did I do wrong or not? Tell me please!
All the manuals that came across to me were written in 2011-2014. As I understand it, the versions of the packages have changed, many commands have become unnecessary. Tell me a good guide! or how to start mastering php - minimally so that something even worked.
PS: before this is coding on ruby, everything works out of the box. And yes, I absolutely do not understand anything in adminstvo and working with servers, there are such people, be tolerant.
apt-get install php
andapt-get install mysql-server
. - Max ZS