简体   繁体   中英

Apache Site configuration failed to load resources

I'm trying to vhost a WordPress site that is located in a folder with the path

/var/www/html/wordpress

I have disabled the 000-default.config and created the following configuration file for exposing this website to port 80

<VirtualHost *:80>
    ServerAdmin Test_Backend@localhost
    DocumentRoot /var/www/html/wordpress
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

This Configuration are located in

etc/apache2/sites-available/wordpress.conf

The site seems hosted now but resources are not loading.

在此处输入图片说明

在此处输入图片说明

Can you please let me know how I can correct this?

probably file permission errors, check here

https://wordpress.org/support/article/changing-file-permissions/ .

Make sure you enforce right permissions to make your resources available to the outside.

sudo chown -R www-data:www-data /var/www/wordpress
sudo find /var/www/wordpress/ -type d -exec chmod 750 {} \;
sudo find /var/www/wordpress/ -type f -exec chmod 640 {} \;

provided your php and apache, apache mods are functioning alright.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM