Jump to content

Apache Ubuntu and Wordpress

Go to solution Solved by cynexit,

Hm, remove the original apache index.html and go to http://mydomain/wp-admin/install.php, if you don't see anything there pastebin you two .conf file and post the link(s).

Hello, I just installed and got Wordpress working on my ubuntu server. Now I'm following a tutorial on how to change themes and customize them and make your site your own.

Tho when then press visit site they get this basic site, when I press it get this to Apache ubuntu default page.

How do I fix this ? :P

Back-end developer, electronics "hacker"

Link to comment
https://linustechtips.com/topic/553576-apache-ubuntu-and-wordpress/
Share on other sites

Link to post
Share on other sites

Go to /etc/apache2/sites-available/ and edit the default, set the paths to your wp installation correctly.

 

Sidenote: You sound like a very inexperienced administrator. Running a not proper administrated server can be dangerous business and can get pretty expensive for you very fast, especially running crappy software like PHP. Please, please, please do some more reading and learn this kind of stuff! You can host a simple WP site for two to five bucks with almost every hoster out there.

Link to post
Share on other sites

23 minutes ago, cynexit said:

Go to /etc/apache2/sites-available/ and edit the default, set the paths to your wp installation correctly.

 

Sidenote: You sound like a very inexperienced administrator. Running a not proper administrated server can be dangerous business and can get pretty expensive for you very fast, especially running crappy software like PHP. Please, please, please do some more reading and learn this kind of stuff! You can host a simple WP site for two to five bucks with almost every hoster out there.

This is just for testing :) and since i already have a Ubuntu server i would like to test it there

EDIT: I'm actually on a computer school right now first year, next year we will start learning basic stuff before moving more into the IT area.

So this is basicly just a "Hobby"

Back-end developer, electronics "hacker"

Link to post
Share on other sites

13 minutes ago, cynexit said:

Go to /etc/apache2/sites-available/ and edit the default, set the paths to your wp installation correctly.

 

Sidenote: You sound like a very inexperienced administrator. Running a not proper administrated server can be dangerous business and can get pretty expensive for you very fast, especially running crappy software like PHP. Please, please, please do some more reading and learn this kind of stuff! You can host a simple WP site for two to five bucks with almost every hoster out there.

By editing the default what do you mean with that? i have added the wordpress.conf there

Back-end developer, electronics "hacker"

Link to post
Share on other sites

9 minutes ago, cynexit said:

CloudFlare blocks me for posting this, so here is my intended post: http://pastebin.com/w4UgLF2R

Ok so I have my wordpress.conf in the same path as the default and I have used a2ensite wordpress.conf

and my wordpress installaion directory is /var /www /html so its basicly like that from before tho there is 2 Index files there one php and one html might this be the problem? should i delete the index.html?

And i also remember when I edited the conf file in the installation it started with <?php or somthing like that but it never closed it > / php?> / ?>

Back-end developer, electronics "hacker"

Link to post
Share on other sites

You can delete the .html file but before that try to go to the .php file explicitly (so http://your.domain/index.php) and see what happens.

You don't need closing tags for php, they just indicate to the parser to stop his work there, a EOF will do the same tough. ;) (And some devs are actually not using closing tags as a form of "good style" to prevent leakage from careless devs)

 

Btw. which tutorial did you follow to install apache/php/mysql?

Link to post
Share on other sites

4 minutes ago, cynexit said:

You can delete the .html file but before that try to go to the .php file explicitly (so http://your.domain/index.php) and see what happens.

You don't need closing tags for php, they just indicate to the parser to stop his work there, a EOF will do the same tough. ;) (And some devs are actually not using closing tags as a form of "good style" to prevent leakage from careless devs)

 

Btw. which tutorial did you follow to install apache/php/mysql?

When accessing http://mydomain/index.php i get redirected to http://mydomain witch is the default apache site (html). So i guess just delete the html?

I already knew how to install mysql so that was really just right forward tho I just got to know about the Secure installation thingy so I did that.

I followed this to install apache since all other tut's I have used ended up screwing up somthing. 

And now following this (here i found that the View site site was missing since i get the apache site.

 

 

Back-end developer, electronics "hacker"

Link to post
Share on other sites

7 minutes ago, cynexit said:

Hm, remove the original apache index.html and go to http://mydomain/wp-admin/install.php, if you don't see anything there pastebin you two .conf file and post the link(s).

Thank you removing the HTML file fixed the problem it's now where it is in the tutorial!

I added the conf files to pastebin just in case there is somthing that needs fixing in here.

000-default.conf http://pastebin.com/UGVPmnuP

wordpress.conf http://pastebin.com/VuJuhNWv

in the wordpress I see there is a x in the start that i dident place there so I'm not removing it x3 or at least until I know why it's there.

Back-end developer, electronics "hacker"

Link to post
Share on other sites

1 hour ago, cynexit said:

Hm, remove the original apache index.html and go to http://mydomain/wp-admin/install.php, if you don't see anything there pastebin you two .conf file and post the link(s).

Ah new problem I'm not able to delete stuff on the website Pictures, Font controls or anything googled and people said it was a permission problem but non said how to fix it.

some said I had to make a .htaccess file and add this

<Limit GET POST PUT DELETE>
  Allow from all
</Limit>

in the /var /www /html / tho i don't like that "Allow from all" part is this what i need to do?

Back-end developer, electronics "hacker"

Link to post
Share on other sites

1 hour ago, cynexit said:

That actually looks good, so try to change

 

WP_DEBUG

 

in your wp-config from "false" to "true", it should then display all errors and warnings in your browser.

No errors other than some chrome extension errors that hasent to do with this :P

And yes I restarted apache2

EDIT: aaand I cannot view it from another network (WAN)

I have portforwarded 80 and i know its working since i did it the same way as i did CSGO, Unturned, Minecraft, TeamSpeak3, FTP, SSH, Cloud etc

Connecting localy to the domain works.

Connecting from another network LTE 4G or ASDL just loads so i think its not a port problem but maby a Listen problem?

Back-end developer, electronics "hacker"

Link to post
Share on other sites

2 hours ago, Joveice said:

Connecting from another network LTE 4G or ASDL just loads so i think its not a port problem but maby a Listen problem?

Yeah, if you want to connect from the outside change add ServerAlias Your.Public.IP.v4 under ServerName in your .conf

Link to post
Share on other sites

5 minutes ago, cynexit said:

Yeah, if you want to connect from the outside change add ServerAlias Your.Public.IP.v4 under ServerName in your .conf

What you mean by that?

should i have it like

ServerName wordpress.lan

ServerAlias mywanip

? And can i use my domain instead? i don't have an Static IP

And do you know anything more about this not able to delete thingy?

Back-end developer, electronics "hacker"

Link to post
Share on other sites

10 minutes ago, cynexit said:

http://pastebin.com/46kLiiNa guess ill be joining the clouadflare party

I live in Norway so its 01:22 here now so I'll be back here in about 11 hours from now of.

Thank you so far but I need you more :D

Back-end developer, electronics "hacker"

Link to post
Share on other sites

1 minute ago, Joveice said:

guess ill be joining the clouadflare party

If you added your domain with www you'll have to call it with www, non-www requests will fail.

But lets do a step back: What error code do you get if you try to connect to your domain? Also, are you being redirected? wordpress has the habit to redirect you to it's default domain which in your case might be wordpress.lan

 

Sorry, I did mean chown in the last post. Besides the actual file rights, is the owner correctly set to www-data?

Link to post
Share on other sites

10 hours ago, cynexit said:

If you added your domain with www you'll have to call it with www, non-www requests will fail.

But lets do a step back: What error code do you get if you try to connect to your domain? Also, are you being redirected? wordpress has the habit to redirect you to it's default domain which in your case might be wordpress.lan

 

Sorry, I did mean chown in the last post. Besides the actual file rights, is the owner correctly set to www-data?

 

if owner is set i don't know I did http://pastebin.com/9A4zeppc

I use www.mydomainname.com and I just get a loading page no errors but it does not get thru and there isent any redirection

Back-end developer, electronics "hacker"

Link to post
Share on other sites

This is new to me too don't worry. over the night (I havent touched the server)

It's all now working I can delete and change stuff that I before couldent (computer I'm using havent been powered off and I have had all the tabs open since last night to not lose where I where)

Now whats left is getting this working outside my network? (It is portforwarded)

Back-end developer, electronics "hacker"

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×