简体   繁体   中英

xampp wordpress virtual hosts - css errors, css not being applied

I am completely new to php and WordPress.

I tried to setup VirtualHosts since I'm working on multiple wp sites, but after doing so my sites aren't showing any CSS, I can't figure out how to navigate to the admin panel anymore and just general errors.

sshot: https://imgur.com/w6q6LLT , https://imgur.com/DQOcNVt

My guess is something to do with paths is screwed up, but I have no idea what to change.

Here is my httpd.vhosts:

NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ##ServerName or ##ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
    ServerName wp.market-test.com
    DocumentRoot "C:/xampp/htdocs/wp-vs-481"
    <Directory "C:/xampp/htdocs/wp-vs-481">
        Options Includes FollowSymLinks
        AllowOverride All
        Allow from 127.0.0.1
    </Directory>
</VirtualHost>

Any help would be great

Edit: Removed outdated directives, issue persists.

I had to change the siteurl/home page in the phpadmin config. My problems were mostly caused by using a outdated guide. Make sure to use a recent guide!

Order, allow,deny not working?

Let's fix it

Possible Cause:

  • Using deprecated syntax

  • Moved content to new server

    "The Allow, Deny, and Order directives, provided by mod_access_compat, are deprecated. You should avoid using them, and avoid outdated tutorials recommending their use."

STEP 1

Check your apache web server version with apache2 -v

OUTPUT should look similar to:

Server version: Apache/2.4.7 (Ubuntu)
Server built:   Jul 27 2017 15:20:24

STEP 2

Because Order deny,allow are deprecated, updated syntax as of this date are as follows:

Require host 1.2.3.4 
Require not host 10.0.1.11 
Require ip ip-address 
Require not host gov

You can create Access Control to fit security policy as deemed necessary.

It' was working just after an update it stopped? NOTE: A simple update may upgrade from 2.4.x to latest which will render old syntax useless

To learn more about this, visit Apache Documentation

Hope this helps.

Please check once by changing the " home " and " siteurl " at wp_option table. Hope it will work if you change it to wp.market-test.com from 127.0.0.1/wp-vs-481

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