خرید بک لینک

Hello, I'm a begier with Ubuntu. On my Cloud Server i installed Ubuntu 14.04, php5,lamp... installed Joomla website and everything was OK until i reboot the VPS. Now my website looks like this
www.deltasoft.solutions

Only plain text. I don't know if it has something with privileges to execute .php? I tried a ton of things but nothing worked. Please help

SOLVED!

For starters we need to enable this module using following command:

sudo a2enmod userdir

Now we will configure Apache module userdir by editing userdir.conf file like this:
sudo nano /etc/apache2/mods-enabled/userdir.conf

Next you should replace the contents of that configuration file with the following code:
<IfModule mod_userdir.c>
UserDir public_html
UserDir disabled root

<Directory /home/*/public_html>
AllowOverride All
Options MultiViews Indexes SymLinksIfOwnerMatch
<Limit GET POST OPTIONS>
# Apache <= 2.2:
Order allow,deny
Allow from all

# Apache >= 2.4:
#Require all granted
</Limit>
<LimitExcept GET POST OPTIONS>
# Apache <= 2.2:
Order deny,allow
Deny from all

# Apache >= 2.4:
#Require all denied
</LimitExcept>
</Directory>
</IfModule>


With this setup Apache web server would serve HTML files from public_html directory of every user on your pc. This HTML files would be accessible using the http://example.com/~user/ syntax. Serving PHP files from user's public_html directoriy is disabled by default for security reasons. If you want to enable PHP processing when using userdir this is what you need to do. First you edit following Apache configuration file in this way:
sudo nano /etc/apache2/mods-available/php5.conf

Now you need to comment out a few lines from <IfModule mod_userdir.c> to the next </IfModule>so you get something like this:
<IfModule mod_php5.c>
<FilesMatch ".ph(p3?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
#<IfModule mod_userdir.c>
# <Directory /home/*/public_html>
# php_admin_value engine Off
# </Directory>
#</IfModule>
</IfModule>

Last thing you just restart Apache web server and create public_html directory inside your home directory like this:
sudo service apache2 restart
mkdir /home/$USER/public_html

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 2 ارديبهشت 1395 ساعت: 5:17

صفحه بندی