Obsolete Releases > SME 8.x Contribs
custom template help needed for hosts file / wordpress
calisun:
I have been dealing with this issue for a very long time, the issue I had was:
If I follow my instructions: http://wiki.contribs.org/User_talk:Calisun
- Simple wordpress installation works fine.
- Multisite install with single domain, ex: domain_com/subsite, works fine.
- But when I try to run multisite with multiple domains, ex: domain1_com domain2_com etc..etc.. pointing to a single wordpress install, the domains work fine and blogs on each domain show up OK, but I was never able to see any images imbedded inside blogs (images uploaded OK, and they would show up while editing the blog, but it would not show up on blog page itself)
After trying many different solutions found here and other pages around the net, I have finally found a solution.
Inside etc/hosts file one only sees:
127.0.0.1 localhost
192.168.3.1 x.domain1.com x
Following the suggestion on the internet, I changed it to:
127.0.0.1 localhost
192.168.3.1 x.domain1.com x
127.0.0.1 *.domain1.com
127.0.0.1 *.domain2.com
127.0.0.1 *.domain3.com
It works great now.
Since I edited the hots file manually, it will get overwritten next time server gets reconfigured.
Is anybody able to help me with writing a custom template so the change will be permanent?
Thank you
mrjhb3:
How about just creating this directory, /etc/e-smith/templates-custom/etc/hosts, then create a file say, 30customhosts, and add your additional entries. Finish with expand-template /etc/hosts
This works for me and survives udpdates, upgrades, etc.
John
janet:
calisun
To learn about creating custom templates, so you do not need to ask questions like this again, please read
http://wiki.contribs.org/Template_Tutorial
calisun:
mrjhb3, thank you for explaining it to me, you are a life saver.
mary, I did see the tutorial, I am not a programmer and I ended up with more questions afterwards than when I started.
Like in mrjhb3 explanation it says to create file, 30customhosts, where did the 30 come from? What does it represent?
Creating custom template for hosts file seems easier for me since it is almost empty to began with. What about large files like httpd.conf, I see a part I want to change to create wildcard subdomains,
FROM:
<VirtualHost 0.0.0.0:80>
ServerName domain.com
ServerAlias ftp.domain.com mail.domain.com proxy.domain.com wpad.domain.com www.domain.com x.domain.com
TO:
<VirtualHost 0.0.0.0:80>
ServerName domain.com
ServerAlias *.domain.com
I have no idea how much of the fragment to include to create the desired results. Also, how do I know if the rest of the httpd.conf entries will not get overwritten by my custom template creation?
Also, what do I name the template? I know the name can be anything, but what about these numbers in front of the name???
I know that it might be very easy for you, but a lot is assumed to be common knowledge in the instructions, and for a non programmer like me, end up with more questions afterwards.
CharlieBrady:
--- Quote from: calisun on August 24, 2012, 07:51:01 AM ---I have no idea how much of the fragment to include to create the desired results. Also, how do I know if the rest of the httpd.conf entries will not get overwritten by my custom template creation?
--- End quote ---
Try it and see. Your best teacher is experience.
I wouldn't be changing anything until I understood the original problem. I'm sure there is a way of fixing your problem without altering /etc/hosts. I would start with examining the HTML which is resulting in the non-displayed images.
Navigation
[0] Message Index
[#] Next page
Go to full version